Re: Query execution based on a condition

Поиск
Список
Период
Сортировка
От msi77
Тема Re: Query execution based on a condition
Дата
Msg-id 2795691356809816@web15e.yandex.ru
обсуждение исходный текст
Ответ на Query execution based on a condition  (JORGE MALDONADO <jorgemal1960@gmail.com>)
Список pgsql-sql
Change the conditions of other 3 queries, so those shall give empty row sets depending on your value.

29.12.2012, 23:06, "JORGE MALDONADO" <jorgemal1960@gmail.com>:
> I have a query similar to the one shown below but, depending on the value of a field, only the first SELECT statement
shoudexecute and the other 3 should be ignored. Is there a way to achieve this situation?
 
>
> SELECT fields FROM tblTable WHERE condition
> UNION
>
> SELECT fields FROM tblTable WHERE condition
>
> UNION
>
> SELECT fields FROM tblTable WHERE condition
> UNION
>
> SELECT fields FROM tblTable WHERE condition
>
> Respectfully,
> Jorge Maldonado



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

Предыдущее
От: "David Johnston"
Дата:
Сообщение: Re: Query execution based on a condition
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: Query execution based on a condition