Thread: error: table does not exist
Using pgAdminII (vb version) i encountered this problem:
SQL syntax to add a single record as a manner of testing:
"INSERT INTO Table1(Age,EmployeeName,Gender,Address1,Address2,Company,Designation,License) "VALUES ('26','jun','m','add1','add2','sttb','sf','1234')"
error### = "table1" does not exist
the thing that confuses me is that i have created the table and named it "Table1" with respective columns as mentioned above. all column data types are set to "text[]"
is there anything wrong?
On Mon, 11 Aug 2003, jun queano wrote: > Using pgAdminII (vb version) i encountered this problem: > > SQL syntax to add a single record as a manner of testing: > "INSERT INTO > Table1(Age,EmployeeName,Gender,Address1,Address2,Company,Designation,License) > "VALUES ('26','jun','m','add1','add2','sttb','sf','1234')" INSERT INTO "Table1" ... For non-all lower case names, if you quoted it when you made the object, you'll need to quote it when you refer to it. The same may apply to your column names if you quoted those on the create as well.
> the thing that confuses me is that i have created the table and named > it "Table1" with respective columns as mentioned above. all column > data types are set to "text[]" By quoting a table name during creation, the name becomes case sensitive. With case sensitive names that have uppercase characters, you must always quote them - otherwise they are forced lowercase (as could be seen in the error message.) So this should fix the problem: INSERT INTO "Table1" (Age, EmployeeName, Gender, Address1, Address2, Company, Designation, License) VALUES ('26', 'jun', 'm', 'add1', 'add2', 'sttb', 'sf', '1234') -- Bryan Bulten http://www.bulten.ca/ http://wxnet.sourceforge.net/
Attachment
thanks a lot...it worked. -jUn :-) ----- Original Message ----- From: "Stephan Szabo" <sszabo@megazone.bigpanda.com> To: "jun queano" <jun@sigmaksa.com> Cc: <pgsql-novice@postgresql.org> Sent: Monday, August 11, 2003 7:26 PM Subject: Re: [NOVICE] error: table does not exist > On Mon, 11 Aug 2003, jun queano wrote: > > > Using pgAdminII (vb version) i encountered this problem: > > > > SQL syntax to add a single record as a manner of testing: > > "INSERT INTO > > Table1(Age,EmployeeName,Gender,Address1,Address2,Company,Designation,License ) > > "VALUES ('26','jun','m','add1','add2','sttb','sf','1234')" > > INSERT INTO "Table1" ... > > For non-all lower case names, if you quoted it when you > made the object, you'll need to quote it when you refer > to it. The same may apply to your column names if you > quoted those on the create as well. >