query tables based on a query
От | solarsail |
---|---|
Тема | query tables based on a query |
Дата | |
Msg-id | aa44f4a30509301547g69dfffcayfe2e967925657822@mail.gmail.com обсуждение исходный текст |
Ответы |
Re: query tables based on a query
|
Список | pgsql-sql |
I have a large number of tables with a common naming convention<br /><br /> basically:<br /><br /> table001, table002,table003 ... table00n<br /><br /><br /> I would like to do a query across all of the tables, however I do not knowall of the tables before hand, and I do not want to manually generate a query like<br /><br /> select * from table001,table002, table003<br /><br /><br /> I have a query that returns the names of the tables I want to query, it isbasically like this:<br /><br /> select tablename from pg_tables where tablename like 'table%'<br /><br /><br /> Howdo I do this? I've tried creating a Table Function that returns the above set and tried to use that in a select clause,but I cant get it to work either.<br /><br /><br /> Thanks for the help<br /><br />
В списке pgsql-sql по дате отправления: