Обсуждение:

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

От
"Sean Weissensee"
Дата:
Why does this error come up
 
 ionsol=> update quickstock set ItemDesc = '10000',Qty = 0.0,salesprice = 0
.0 where StockID = '8597' \g
ERROR:  Relation 'quickstock' does not have attribute 'itemdesc'  
 
when ItemDesc does exist.
 
Sean

Re:

От
"Ross J. Reedstrom"
Дата:
On Mon, Nov 20, 2000 at 01:24:32PM +1000, Sean Weissensee wrote:
> Why does this error come up
> 
>  ionsol=> update quickstock set ItemDesc = '10000',Qty = 0.0,salesprice = 0
> .0 where StockID = '8597' \g
> ERROR:  Relation 'quickstock' does not have attribute 'itemdesc'   
> 
> when ItemDesc does exist.


Because SQL is case insensitive, by default. Postgresql implements this by
downcasing all identifiers (table and column names) unless quoted with
double quotes. I'm guessing that you created this table via MS-Access. The
ODBC driver quotes identifiers by default.

Try this:

update quickstock set "ItemDesc" = '10000',"Qty" = 0.0,salesprice =
0.0 where "StockID" = '8597' \g

Ross
-- 
Open source code is like a natural resource, it's the result of providing
food and sunshine to programmers, and then staying out of their way.
[...] [It] is not going away because it has utility for both the developers 
and users independent of economic motivations.  Jim Flynn, Sunnyvale, Calif.