Re: help w/ query
От | Ernesto Baschny |
---|---|
Тема | Re: help w/ query |
Дата | |
Msg-id | 3BD690ED.12981.8C50CA@localhost обсуждение исходный текст |
Ответ на | help w/ query ("G.L. Grobe" <gary@grobe.net>) |
Список | pgsql-general |
On 19 Oct 2001 at 19:32, G.L. Grobe wrote: > Anyone help w/ the following sql query ... Here's my tables ... > > table A > id name > -----|------- > 1000 AA > 1001 AB > 1002 AC > 1003 AD > > table B > id pid > -----|------- > 1000 1000 > 1001 1000 > 1002 1000 > 1003 1001 > 1004 1001 > > Here's my query, (note that 'AA' is all the info I provide, > cause that's the ) ... > > SELECT B.id FROM B, A WHERE B.pid = A.id AND A.name = 'AA'; I think you misspelled the first parameter of the first WHERE condition. It should be "B.id", not "B.pid": SELECT B.id FROM B, A WHERE B.id = A.id AND A.name = 'AA'; -- Ernesto Baschny <ernst@baschny.de> http://www.baschny.de - PGP Key: http://www.baschny.de/pgp.txt Sao Paulo/Brasil - Stuttgart/Germany Ernst@IRCnet - ICQ# 2955403
В списке pgsql-general по дате отправления: