Re: Tricky SQL problem - retrieve information_schema info and make use of it.

Поиск
Список
Период
Сортировка
От Paul Linehan
Тема Re: Tricky SQL problem - retrieve information_schema info and make use of it.
Дата
Msg-id CAF4RT5TNOgkrRoqzOx_G424edS607YsX=GSSyqtzdGEohnVNow@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Tricky SQL problem - retrieve information_schema info and make use of it.  (Steve Crawford <scrawford@pinpointresearch.com>)
Ответы Re: Tricky SQL problem - retrieve information_schema info and make use of it.  (Paul Linehan <linehanp@tcd.ie>)
Список pgsql-novice
Hi, and thanks for your input.

>> I want to be able to query results for each salesman - but new sales
>> personnel are being added and deleted all the time, so a static list
>> is not appropriate.


> OK, we won't blame you.

Phew! :-)


> But since the tables are identical, have you
> considered inheritance?


Ah, therein lies the rub! This system has to work on MS SQL Server
and Oracle - I'll look into this solution there also.


> Create table allsalespersons... to have a master table with the same
> structure as the individual salesperson.

> For existing tables, convert them to child tables:
> alter table fred inherit allsalespersons;
> ...
> For new tables just create them as inherited to begin with.
> Now you can select from "allsalespersons" and get everyone.


It's certainly an elegant solution - I'll just have to see what can be done on
other RDBMSs - thanks again for your input.


Paul...


> Steve


В списке pgsql-novice по дате отправления:

Предыдущее
От: Paul Linehan
Дата:
Сообщение: Re: Tricky SQL problem - retrieve information_schema info and make use of it.
Следующее
От: Wei Shan
Дата:
Сообщение: Re: Help with text(decimal) to hex conversion