From: Ashish Karalkar <ashish.karalkar@info-spectrum.com>
To: pgsql-sql@postgresql.org
Subject: Using case or if to return multiple rows
Date: Thu, 12 Jul 2007 12:15:24 +0530
Message-ID: <005401c7c450$3d6670e0$170211ac@LIONKING.COM> (raw)
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....
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: ashish.karalkar@info-spectrum.com
Subject: Re: Using case or if to return multiple rows
In-Reply-To: <005401c7c450$3d6670e0$170211ac@LIONKING.COM>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox