dbTalk Databases Forums  

ERROR: column "id" does not exist

comp.databases.postgresql.general comp.databases.postgresql.general


Discuss ERROR: column "id" does not exist in the comp.databases.postgresql.general forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Sandro Daehler
 
Posts: n/a

Default ERROR: column "id" does not exist - 11-15-2004 , 06:44 AM






Hy

i have a problem with the following statement:

SELECT MAX(id) FROM apconfig;

if i send this statement i got the following error:

ERROR: column "id" does not exist

Can anyone explain me this error? There is the column id, and there are
also entries in it.

thx



---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo (AT) postgresql (DOT) org)


Reply With Quote
  #2  
Old   
Michael Fuhr
 
Posts: n/a

Default Re: ERROR: column "id" does not exist - 11-16-2004 , 07:05 PM






On Mon, Nov 15, 2004 at 01:44:47PM +0100, Sandro Daehler wrote:

Quote:
SELECT MAX(id) FROM apconfig;

if i send this statement i got the following error:

ERROR: column "id" does not exist

Can anyone explain me this error? There is the column id, and there are
also entries in it.
The column might have a different case or possibly leading or
trailing spaces, in which case you'll have to quote it verbatim.
What does \d apconfig show? If that doesn't show the problem
then try this:

SELECT quote_ident(attname) FROM pg_attribute
WHERE attrelid = 'apconfig'::regclass;

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.