Обсуждение: hi can u give solution to this query

Поиск
Список
Период
Сортировка

hi can u give solution to this query

От
"Penchalaiah P."
Дата:

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……….

 

 

Thanks  &  Regards

Penchal reddy | Software Engineer           

Infinite Computer Solutions | Exciting Times…Infinite Possibilities...

SEI-CMMI level 5 | ISO 9001:2000

IT SERVICES | BPO                                                                                                                                                                          

Telecom | Finance | Healthcare | Manufacturing | Energy & Utilities | Retail & Distribution | Government                                                       

Tel +91-80-5193-0000(Ext:503)| Fax  +91-80-51930009 | Cell No  +91-9980012376|www.infics.com          

Information transmitted by this e-mail is proprietary to Infinite Computer Solutions and/ or its Customers and is intended for use only by the individual or entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly prohibited. In such cases, please notify us immediately at info.in@infics.com and delete this mail from your records.

 

Re: hi can u give solution to this query

От
"Dave Page"
Дата:
 


From: pgsql-sql-owner@postgresql.org [mailto:pgsql-sql-owner@postgresql.org] On Behalf Of Penchalaiah P.
Sent: 23 May 2006 13:41
To: pgsql-sql@postgresql.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.