Re: How to make a IN without a table... ?

Поиск
Список
Период
Сортировка
От Bruno Wolff III
Тема Re: How to make a IN without a table... ?
Дата
Msg-id 20030608111113.GA14337@wolff.to
обсуждение исходный текст
Ответ на How to make a IN without a table... ?  (David Pradier <dpradier@apartia.fr>)
Список pgsql-sql
On Wed, Jun 04, 2003 at 16:59:02 +0200, David Pradier <dpradier@apartia.fr> wrote:
> 
> In short, i want to calculate the result of the function my_function for
> some values of my_var1, cross by some values of my_var2.
> These values are not taken in a table, but put in directly.
> They are a lot, so i would prefer not to write the whole thing, line
> after line. (Let's say 10 values for the first, and 40 for the second =>
> 400 lines of code to maintain...)
> 
> I really don't see how to do this :-/

You could programatically generate the sql code and use union
(e.g. (select 1 union select 2 union select 3 union select 4))
to join the rows together or you could write a set returning
function.


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

Предыдущее
От: Bruno Wolff III
Дата:
Сообщение: Re: "Join" on delimeter aggregate query
Следующее
От: "Mendola Gaetano"
Дата:
Сообщение: Re: EXTERN JOIN with WHEN query