Thread: hi can u give solution to this query
<div class="Section1"><p class="MsoNormal"><font face="Arial" size="2"><span style="font-size:10.0pt; font-family:Arial">Hi sir… </span></font><p class="MsoNormal"><font face="Arial" size="2"><span style="font-size:10.0pt; font-family:Arial"> </span></font><p class="MsoNormal"><font face="Arial" size="2"><span style="font-size:10.0pt; font-family:Arial"> If u don’t mind can u reply for this question</span></font><p class="MsoNormal"><font face="Arial" size="2"><spanstyle="font-size:10.0pt; font-family:Arial"> </span></font><p class="MsoNormal"><font face="Arial" size="2"><span style="font-size:10.0pt; font-family:Arial">This is one table… it has one primary key…….so I can insert the values from data edit…</span></font><pclass="MsoNormal"><font face="Arial" size="2"><span style="font-size:10.0pt; font-family:Arial"> </span></font><p class="MsoNormal"><font face="Arial" size="2"><span style="font-size:10.0pt; font-family:Arial">1)…CREATE TABLE "ADV"</span></font><p class="MsoNormal"><font face="Arial" size="2"><span style="font-size:10.0pt; font-family:Arial">(</span></font><p class="MsoNormal"><font face="Arial" size="2"><span style="font-size:10.0pt; font-family:Arial"> "T-Section_Id" varchar(10) NOT NULL,</span></font><p class="MsoNormal"><font face="Arial" size="2"><spanstyle="font-size:10.0pt; font-family:Arial"> "CDA_No" varchar(7) NOT NULL,</span></font><p class="MsoNormal"><font face="Arial" size="2"><span style="font-size:10.0pt; font-family:Arial"> "Imp_Schedule_Id" int4 NOT NULL,</span></font><p class="MsoNormal"><font face="Arial" size="2"><spanstyle="font-size:10.0pt; font-family:Arial"> "Sanction_No" varchar(20) NOT NULL,</span></font><p class="MsoNormal"><font face="Arial" size="2"><spanstyle="font-size:10.0pt; font-family:Arial"> "Sanction_Date" date NOT NULL,</span></font><p class="MsoNormal"><font face="Arial" size="2"><span style="font-size:10.0pt; font-family:Arial"> "Station_From" varchar(20) NOT NULL,</span></font><p class="MsoNormal"><font face="Arial" size="2"><spanstyle="font-size:10.0pt; font-family:Arial"> "Station_To" varchar(20) NOT NULL,</span></font><p class="MsoNormal"><font face="Arial" size="2"><spanstyle="font-size:10.0pt; font-family:Arial"> "Amt_Claimed" int4,</span></font><p class="MsoNormal"><font face="Arial" size="2"><span style="font-size:10.0pt; font-family:Arial"> "Amt_Admitted" int4,</span></font><p class="MsoNormal"><font face="Arial" size="2"><span style="font-size:10.0pt; font-family:Arial"> "Dak_Id" varchar(20) NOT NULL,</span></font><p class="MsoNormal"><font face="Arial" size="2"><span style="font-size:10.0pt; font-family:Arial"> "Refund_Dak_Id" int4 NOT NULL,</span></font><p class="MsoNormal"><font face="Arial" size="2"><span style="font-size:10.0pt; font-family:Arial"> "T-Wing_Allowance_Id" varchar(10) NOT NULL,</span></font><p class="MsoNormal"><font face="Arial" size="2"><spanstyle="font-size:10.0pt; font-family:Arial"> CONSTRAINT "ADV_pkey" PRIMARY KEY ("T-Section_Id")</span></font><p class="MsoNormal"><font face="Arial"size="2"><span style="font-size:10.0pt; font-family:Arial">) </span></font><p class="MsoNormal"><font face="Arial" size="2"><span style="font-size:10.0pt; font-family:Arial">WITHOUT OIDS;</span></font><p class="MsoNormal"><font face="Arial" size="2"><span style="font-size:10.0pt; font-family:Arial">ALTER TABLE "ADV" OWNER TO postgres;</span></font><p class="MsoNormal"><font color="navy" face="Arial"size="2"><span style="font-size: 10.0pt;font-family:Arial;color:navy"> </span></font><p class="MsoNormal"><font color="navy" face="Arial" size="2"><span style="font-size: 10.0pt;font-family:Arial;color:navy">2) this table doesn’t contain primary key … but I cant insert values from data edit…</span></font><pclass="MsoNormal"><font color="navy" face="Arial" size="2"><span style="font-size: 10.0pt;font-family:Arial;color:navy"> </span></font><p class="MsoNormal"><font color="navy" face="Arial" size="2"><span style="font-size: 10.0pt;font-family:Arial;color:navy"> </span></font><p class="MsoNormal"><font color="navy" face="Arial" size="2"><span style="font-size: 10.0pt;font-family:Arial;color:navy">CREATE TABLE "ADV_LTC"</span></font><p class="MsoNormal"><font color="navy" face="Arial"size="2"><span style="font-size: 10.0pt;font-family:Arial;color:navy">(</span></font><p class="MsoNormal"><font color="navy" face="Arial" size="2"><span style="font-size: 10.0pt;font-family:Arial;color:navy"> "T-Section_Id" varchar(20) NOT NULL,</span></font><p class="MsoNormal"><font color="navy"face="Arial" size="2"><span style="font-size: 10.0pt;font-family:Arial;color:navy"> "Ltc_Block_Year" date NOT NULL,</span></font><p class="MsoNormal"><font color="navy"face="Arial" size="2"><span style="font-size: 10.0pt;font-family:Arial;color:navy"> "Ltc_Type" varchar(10) NOT NULL,</span></font><p class="MsoNormal"><font color="navy"face="Arial" size="2"><span style="font-size: 10.0pt;font-family:Arial;color:navy"> "Leave_Period_From" date NOT NULL,</span></font><p class="MsoNormal"><font color="navy"face="Arial" size="2"><span style="font-size: 10.0pt;font-family:Arial;color:navy"> "Leave_Period_To" date NOT NULL,</span></font><p class="MsoNormal"><font color="navy"face="Arial" size="2"><span style="font-size: 10.0pt;font-family:Arial;color:navy"> "Date_Journey" date NOT NULL,</span></font><p class="MsoNormal"><font color="navy"face="Arial" size="2"><span style="font-size: 10.0pt;font-family:Arial;color:navy"> "Travelling" varchar(10) NOT NULL,</span></font><p class="MsoNormal"><font color="navy"face="Arial" size="2"><span style="font-size: 10.0pt;font-family:Arial;color:navy"> "No_Child" int4,</span></font><p class="MsoNormal"><font color="navy" face="Arial"size="2"><span style="font-size: 10.0pt;font-family:Arial;color:navy"> "No_Adult" int4,</span></font><p class="MsoNormal"><font color="navy" face="Arial"size="2"><span style="font-size: 10.0pt;font-family:Arial;color:navy"> "Child_Fare" int4,</span></font><p class="MsoNormal"><font color="navy" face="Arial"size="2"><span style="font-size: 10.0pt;font-family:Arial;color:navy"> "Adult_Fare" int4,</span></font><p class="MsoNormal"><font color="navy" face="Arial"size="2"><span style="font-size: 10.0pt;font-family:Arial;color:navy"> "Journey_Fare" int4,</span></font><p class="MsoNormal"><font color="navy" face="Arial"size="2"><span style="font-size: 10.0pt;font-family:Arial;color:navy"> "Amt_Clm" int4 NOT NULL,</span></font><p class="MsoNormal"><font color="navy" face="Arial"size="2"><span style="font-size: 10.0pt;font-family:Arial;color:navy"> "Amt_Adm" int4,</span></font><p class="MsoNormal"><font color="navy" face="Arial"size="2"><span style="font-size: 10.0pt;font-family:Arial;color:navy"> "Remarks" varchar(40)</span></font><p class="MsoNormal"><font color="navy" face="Arial"size="2"><span style="font-size: 10.0pt;font-family:Arial;color:navy">) </span></font><p class="MsoNormal"><font color="navy" face="Arial" size="2"><spanstyle="font-size: 10.0pt;font-family:Arial;color:navy">WITHOUT OIDS;</span></font><p class="MsoNormal"><font color="navy" face="Arial" size="2"><spanstyle="font-size: 10.0pt;font-family:Arial;color:navy">ALTER TABLE "ADV_LTC" OWNER TO postgres;</span></font><p class="MsoNormal"><font color="navy"face="Arial" size="2"><span style="font-size: 10.0pt;font-family:Arial;color:navy"> </span></font><p class="MsoNormal"><font color="navy" face="Arial" size="2"><span style="font-size: 10.0pt;font-family:Arial;color:navy"> </span></font><p class="MsoNormal"><font color="navy" face="Arial" size="2"><span style="font-size: 10.0pt;font-family:Arial;color:navy"> Can u check it y I am unable to insert values to 2<sup>nd</sup> table………. </span></font><pclass="MsoNormal"><font face="Arial" size="2"><span style="font-size:10.0pt; font-family:Arial"> </span></font><p class="MsoNormal"><font face="Arial" size="2"><span style="font-size:10.0pt; font-family:Arial"> </span></font><p class="MsoNormal" style="mso-margin-top-alt:auto;margin-bottom:5.0pt"><b><font color="navy"face="Tahoma" size="1"><span style="font-size:8.0pt;font-family:Tahoma; color:navy;font-weight:bold">Thanks & Regards</span></font><font color="navy"><span style="color:navy"></span></font></b><pclass="MsoNormal" style="mso-margin-top-alt:auto;margin-bottom:5.0pt"><b><font color="navy"face="Tahoma" size="1"><span style="font-size:8.0pt;font-family:Tahoma; color:navy;font-weight:bold">Penchal reddy </span></font></b><b><font color="red" face="Tahoma" size="1"><span style="font-size:8.0pt;font-family:Tahoma; color:red;font-weight:bold">|</span></font></b><b><font color="navy" face="Tahoma" size="1"><span style="font-size:8.0pt;font-family:Tahoma;color:navy; font-weight:bold"> Software Engineer </span></font><font color="navy"><span style="color:navy"></span></font></b><pclass="MsoNormal" style="mso-margin-top-alt:auto;margin-bottom:5.0pt"><b><font color="navy"face="Tahoma" size="1"><span style="font-size:8.0pt;font-family:Tahoma; color:navy;font-weight:bold">Infinite Computer Solutions </span></font></b><b><font color="red" face="Tahoma" size="1"><spanstyle="font-size:8.0pt;font-family:Tahoma; color:red;font-weight:bold">|</span></font></b><b><font color="navy" face="Tahoma" size="1"><span style="font-size:8.0pt;font-family:Tahoma;color:navy; font-weight:bold"> Exciting Times…Infinite Possibilities... </span></font><font color="navy"><span style="color:navy"></span></font></b><pclass="MsoNormal" style="mso-margin-top-alt:auto;margin-bottom:5.0pt"><b><font color="navy"face="Tahoma" size="1"><span style="font-size:8.0pt;font-family:Tahoma; color:navy;font-weight:bold">SEI-CMMI level 5 </span></font></b><b><font color="red" face="Tahoma" size="1"><span style="font-size:8.0pt;font-family:Tahoma; color:red;font-weight:bold">| </span></font></b><b><font color="black" face="Tahoma" size="1"><span style="font-size:8.0pt;font-family:Tahoma;color:black; font-weight:bold">ISO 9001:2000</span></font><font color="navy"><span style="color:navy"></span></font></b><p class="MsoNormal"style="mso-margin-top-alt:auto;margin-bottom:5.0pt"><b><font color="navy" face="Tahoma" size="1"><span style="font-size:8.0pt;font-family:Tahoma; color:navy;font-weight:bold">IT SERVICES </span></font></b><b><font color="red" face="Tahoma" size="1"><span style="font-size:8.0pt;font-family:Tahoma; color:red;font-weight:bold">|</span></font></b><b><font color="navy" face="Tahoma" size="1"><span style="font-size:8.0pt;font-family:Tahoma;color:navy; font-weight:bold"> BPO </span></font><fontcolor="navy"><span style="color:navy"></span></font></b><p class="MsoNormal" style="mso-margin-top-alt:auto;margin-bottom:5.0pt"><b><fontcolor="navy" face="Tahoma" size="1"><span style="font-size:8.0pt;font-family:Tahoma; color:navy;font-weight:bold">Telecom </span></font></b><b><font color="red" face="Tahoma" size="1"><span style="font-size:8.0pt;font-family:Tahoma; color:red;font-weight:bold">|</span></font></b><b><font color="navy" face="Tahoma" size="1"><span style="font-size:8.0pt;font-family:Tahoma;color:navy; font-weight:bold"> </span></font></b><b><font color="black" face="Tahoma" size="1"><span style="font-size:8.0pt;font-family:Tahoma;color:black;font-weight:bold">Finance</span></font></b><b><font color="red" face="Tahoma"size="1"><span style="font-size: 8.0pt;font-family:Tahoma;color:red;font-weight:bold">|</span></font></b><b><font color="navy" face="Tahoma" size="1"><spanstyle="font-size:8.0pt;font-family:Tahoma; color:navy;font-weight:bold"> </span></font></b><b><font color="black" face="Tahoma" size="1"><span style="font-size:8.0pt;font-family:Tahoma;color:black; font-weight:bold">Healthcare </span></font></b><b><font color="red" face="Tahoma" size="1"><span style="font-size:8.0pt;font-family:Tahoma;color:red; font-weight:bold">| </span></font></b><b><font color="black" face="Tahoma" size="1"><span style="font-size:8.0pt;font-family:Tahoma;color:black;font-weight:bold">Manufacturing</span></font></b><b><font color="red"face="Tahoma" size="1"><span style="font-size: 8.0pt;font-family:Tahoma;color:red;font-weight:bold">|</span></font></b><b><font color="navy" face="Tahoma" size="1"><spanstyle="font-size:8.0pt;font-family:Tahoma; color:navy;font-weight:bold"> </span></font></b><b><font color="black" face="Tahoma" size="1"><span style="font-size:8.0pt;font-family:Tahoma;color:black; font-weight:bold">Energy & Utilities </span></font></b><b><font color="red" face="Tahoma" size="1"><span style="font-size:8.0pt;font-family:Tahoma; color:red;font-weight:bold">|</span></font></b><b><font color="navy" face="Tahoma" size="1"><span style="font-size:8.0pt;font-family:Tahoma;color:navy; font-weight:bold"> </span></font></b><b><font color="black" face="Tahoma" size="1"><span style="font-size:8.0pt;font-family:Tahoma;color:black;font-weight:bold">Retail& Distribution </span></font></b><b><fontcolor="red" face="Tahoma" size="1"><span style="font-size:8.0pt;font-family:Tahoma;color:red;font-weight:bold">|</span></font></b><b><fontcolor="navy" face="Tahoma"size="1"><span style="font-size:8.0pt;font-family:Tahoma; color:navy;font-weight:bold"> </span></font></b><b><font color="black" face="Tahoma" size="1"><span style="font-size:8.0pt;font-family:Tahoma;color:black; font-weight:bold">Government </span></font><font color="navy"><spanstyle="color:navy"></span></font></b><p class="MsoNormal" style="mso-margin-top-alt:auto;margin-bottom:5.0pt"><b><fontcolor="navy" face="Tahoma" size="1"><span style="font-size:8.0pt;font-family:Tahoma; color:navy;font-weight:bold">Tel +91-80-5193-0000(Ext:503)</span></font></b><b><font color="red" face="Tahoma" size="1"><spanstyle="font-size:8.0pt;font-family:Tahoma; color:red;font-weight:bold">|</span></font></b><b><font color="navy" face="Tahoma" size="1"><span style="font-size:8.0pt;font-family:Tahoma;color:navy; font-weight:bold"> Fax +91-80-51930009 </span></font></b><b><font color="red" face="Tahoma" size="1"><span style="font-size:8.0pt;font-family:Tahoma; color:red;font-weight:bold">|</span></font></b><b><font color="navy" face="Tahoma" size="1"><span style="font-size:8.0pt;font-family:Tahoma;color:navy; font-weight:bold"> Cell No +91-9980012376</span></font></b><b><font color="red" face="Tahoma" size="1"><span style="font-size:8.0pt;font-family:Tahoma; color:red;font-weight:bold">|</span></font></b><b><font color="navy" face="Tahoma" size="1"><span style="font-size:8.0pt;font-family:Tahoma;color:navy; font-weight:bold">www.infics.com</span></font></b><b><font color="black" face="Tahoma" size="1"><span style="font-size:8.0pt;font-family:Tahoma;color:black; font-weight:bold"> </span></font><font color="navy"><span style="color:navy"></span></font></b><p class="MsoNormal"style="mso-margin-top-alt:auto;margin-bottom:5.0pt"><b><font color="gray" face="Tahoma" size="1"><span style="font-size:8.0pt;font-family:Tahoma; color:gray;font-weight:bold">Information transmitted by this e-mail is proprietary to Infinite Computer Solutions and/ orits Customers and is intended for use only by the individual or entity to which it is addressed, and may contain informationthat is privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipientor it appears that this mail has been forwarded to you without proper authority, you are notified that any use ordissemination of this information in any manner is strictly prohibited. In such cases, please notify us immediately at</span></font></b><b><fontcolor="black" face="Tahoma" size="1"><span style="font-size:8.0pt;font-family:Tahoma; color:black;font-weight:bold"> </span></font></b><b><u><font color="gray" face="Tahoma" size="1"><span style="font-size:8.0pt;font-family:Tahoma;color:gray; font-weight:bold">info.in@infics.com </span></font></u></b><b><font color="gray" face="Tahoma" size="1"><span style="font-size:8.0pt;font-family:Tahoma; color:gray;font-weight:bold">and delete this mail from your records.</span></font><font color="navy"><span style="color:navy"></span></font></b><pclass="MsoNormal"><font face="Times New Roman" size="3"><span style="font-size: 12.0pt"> </span></font></div>
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 queryHi 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.