Re: SQL subquery to supply table name?
От | Stephan Szabo |
---|---|
Тема | Re: SQL subquery to supply table name? |
Дата | |
Msg-id | 20020926180014.G32077-100000@megazone23.bigpanda.com обсуждение исходный текст |
Ответ на | Re: SQL subquery to supply table name? (Scott Chapman <scott_list@mischko.com>) |
Список | pgsql-general |
On Thu, 26 Sep 2002, Scott Chapman wrote: > Here's the details: > Table "reviews" > Column | Type | Modifiers > ---------------------------------+---------+---------------------------------------- > review_num | integer | default > nextval('review_number'::text) > table_quest | text | > > > Table "mpe_quest" > Column | Type | Modifiers > ------------------------+---------+----------- > review_num | integer | > txtcompanyname | text | > > > select foo.txtcompanyname from (select table_quest from reviews where > review_num=28) as foo where review_num=28; > It comes back and says No such attribute or function foo.txtcompanyname. Yep, foo has a table_quest column. In 7.3 (now in beta) you probably could make a function that returns a rowset from the table given as its argument.
В списке pgsql-general по дате отправления: