Re: hi can u give solution to this query

From: "Dave Page" <dpage(at)vale-housing(dot)co(dot)uk>
To: "Penchalaiah P(dot)" <penchalaiahp(at)infics(dot)com>, <pgsql-sql(at)postgresql(dot)org>
Subject: Re: hi can u give solution to this query
Date: 2006-05-23 12:43:56
Message-ID: E7F85A1B5FF8D44C8A1AF6885BC9A0E401388442@ratbert.vale-housing.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

________________________________

From: pgsql-sql-owner(at)postgresql(dot)org
[mailto:pgsql-sql-owner(at)postgresql(dot)org] On Behalf Of Penchalaiah P.
Sent: 23 May 2006 13:41
To: pgsql-sql(at)postgresql(dot)org
Subject: [SQL] hi can u give solution to this query

Hi sir...

If u don't mind can u reply for this question

This is one table... it has one primary key.......so I can
insert the values from data edit...

1)...CREATE TABLE "ADV"

(

"T-Section_Id" varchar(10) NOT NULL,

"CDA_No" varchar(7) NOT NULL,

"Imp_Schedule_Id" int4 NOT NULL,

"Sanction_No" varchar(20) NOT NULL,

"Sanction_Date" date NOT NULL,

"Station_From" varchar(20) NOT NULL,

"Station_To" varchar(20) NOT NULL,

"Amt_Claimed" int4,

"Amt_Admitted" int4,

"Dak_Id" varchar(20) NOT NULL,

"Refund_Dak_Id" int4 NOT NULL,

"T-Wing_Allowance_Id" varchar(10) NOT NULL,

CONSTRAINT "ADV_pkey" PRIMARY KEY ("T-Section_Id")

)

WITHOUT OIDS;

ALTER TABLE "ADV" OWNER TO postgres;

2) this table doesn't contain primary key ... but I cant insert
values from data edit...

CREATE TABLE "ADV_LTC"

(

"T-Section_Id" varchar(20) NOT NULL,

"Ltc_Block_Year" date NOT NULL,

"Ltc_Type" varchar(10) NOT NULL,

"Leave_Period_From" date NOT NULL,

"Leave_Period_To" date NOT NULL,

"Date_Journey" date NOT NULL,

"Travelling" varchar(10) NOT NULL,

"No_Child" int4,

"No_Adult" int4,

"Child_Fare" int4,

"Adult_Fare" int4,

"Journey_Fare" int4,

"Amt_Clm" int4 NOT NULL,

"Amt_Adm" int4,

"Remarks" varchar(40)

)

WITHOUT OIDS;

ALTER TABLE "ADV_LTC" OWNER TO postgres;

Can u check it y I am unable to insert values to 2nd
table..........

You have answered your own question. pgAdmin won't allow you to edit a
table without either OIDs or a Primary Key because it has no way to
identify a row (which many would say is a broken design).

Regards, Dave.

Browse pgsql-sql by date

  From Date Subject
Next Message Jorge Godoy 2006-05-23 20:16:54 (Ab)Using schemas and inheritance
Previous Message Penchalaiah P. 2006-05-23 12:40:56 hi can u give solution to this query