Using case or if to return multiple rows

From: "Ashish Karalkar" <ashish(dot)karalkar(at)info-spectrum(dot)com>
To: <pgsql-sql(at)postgresql(dot)org>
Subject: Using case or if to return multiple rows
Date: 2007-07-12 06:45:24
Message-ID: 005401c7c450$3d6670e0$170211ac@LIONKING.COM
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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....

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Pavel Stehule 2007-07-12 07:09:04 Re: Using case or if to return multiple rows
Previous Message Andrej Ricnik-Bay 2007-07-11 18:39:45 Re: linux