Using case or if to return multiple rows

Поиск
Список
Период
Сортировка
От Ashish Karalkar
Тема Using case or if to return multiple rows
Дата
Msg-id 005401c7c450$3d6670e0$170211ac@LIONKING.COM
обсуждение исходный текст
Ответы Re: Using case or if to return multiple rows  ("Pavel Stehule" <pavel.stehule@gmail.com>)
Re: Using case or if to return multiple rows  (Ragnar <gnari@hive.is>)
Список pgsql-sql
Hello all,
 
 
I want to select data from two diffrent table based on third tables column
somthing like:
 
 
select case when  t3.date='xxxx' then
                    select * from table1
 
else
                    select * from table 2
       
 from table3  t3             where t3.date='xxxxx'
 
 
Problem is that I have to do it in Plain SQL.
 
Is there a anyway.
 
Thanks in Advance
 
With egards
Ashish....
 

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

Предыдущее
От: "Andrej Ricnik-Bay"
Дата:
Сообщение: Re: linux
Следующее
От: "Pavel Stehule"
Дата:
Сообщение: Re: Using case or if to return multiple rows