Thread: psql problem
Does anyone know why when I am in a particular DB as user postgres and use the following statement, why I get this error?" This is the statement; SELECT * FROM some_file where ID = 1; ---------------------------------------------------------------------------- Error: ERROR: attribute 'id' not found Execution time 0.02 sec. But if I use the following statement, everything is returned fine. SELECT * FROM servlet_file; Thanks ahead of time, Rick Parker
What is the definition of the table 'some_table'?? Regards, Ed Loehr Rick Parker wrote: > > Does anyone know why when I am in a particular DB as user postgres and use > the following statement, why I get this error?" > > This is the statement; > SELECT * FROM some_file where ID = 1; > > ---------------------------------------------------------------------------- > Error: ERROR: attribute 'id' not found > Execution time 0.02 sec. > > But if I use the following statement, everything is returned fine. > > SELECT * FROM servlet_file; > > Thanks ahead of time, > > Rick Parker
> > Does anyone know why when I am in a particular DB as user postgres and use > > the following statement, why I get this error?" > > > > This is the statement; > > SELECT * FROM some_file where ID = 1; > > > > -------------------------------------------------------------------------- -- > > Error: ERROR: attribute 'id' not found > > Execution time 0.02 sec. That indicates that you have no column named 'id'.. > > But if I use the following statement, everything is returned fine. > > > > SELECT * FROM servlet_file; That's a totally different query which would yeild totally different results.. -Mitch
Does anyone know why when I am in a particular DB as user postgres and use the following statement, why I get this error?" This is the statement; SELECT * FROM some_file where ID = 1; [Volker Paul] If your ID field is really uppercase, try: SELECT * FROM some_file where "ID" = 1; Cheers, Volker