Re: Problems with join (no such attribute, but it exists)
От | Manfred Koizar |
---|---|
Тема | Re: Problems with join (no such attribute, but it exists) |
Дата | |
Msg-id | 8p8acv45sf5fkd6taq2op2or2ukebqllf8@4ax.com обсуждение исходный текст |
Ответ на | Problems with join (no such attribute, but it exists) (Matej Cepl <cepl@surfbest.net>) |
Ответы |
Re: Problems with join (no such attribute, but it exists)
|
Список | pgsql-novice |
On Wed, 14 May 2003 12:30:07 -0400, Matej Cepl <cepl@surfbest.net> wrote: > grass=> \d tracts_towns2000 > Table "tracts_towns2000" > Column | Type | Modifiers > -----------+-----------------------+----------- > COMPL_ID | character varying(18) | not null > COUNTY_ID | smallint | not null > TRACT_ID | integer | not null > TOWN_ID | smallint | not null > AREA_ID | smallint | not null > Primary key: tracts_towns2000_pkey Somehow you managed to create your table with all uppercase column names. So you have to keep double quoting these names. > grass=> SELECT conv.tract_id, tr.tract FROM tracts_towns2000 conv, > tracts2000 tr LIMIT 5; > ERROR: No such attribute or function 'tract_id' SELECT conv."TRACT_ID", tr.tract FROM tracts_towns2000 conv, tracts2000 tr LIMIT 5; BTW, unless one of these tables has only one row, you almost certainly want to add a WHERE clause to your query, something like WHERE tr.thiscolumn = conv.thatcolumn Servus Manfred
В списке pgsql-novice по дате отправления: