Re: SQLPLUS Oracle 8i query
From: Cris Carampa <cris119_at_operamail.com>
Date: Thu, 20 Jul 2006 09:15:31 +0200
Message-ID: <44bf2d94$0$985$5fc30a8_at_news.tiscali.it>
Date: Thu, 20 Jul 2006 09:15:31 +0200
Message-ID: <44bf2d94$0$985$5fc30a8_at_news.tiscali.it>
vernalGreens_at_gmail.com wrote:
> I want to modify the query so that "and city = 'xyz'" run only when
> region = pqr.
You can do that with plain SQL, there's no need for procedural constructs here.
It's not clear what you want to do with rows with region!='pqr'. I assumed you wish to select all of them. Then:
select * from tablename
where
country = 'abc' and
(
[Quoted] (region='pqr' and city='xyz')
or
(region!='pqr')
)
Kind regards,
-- Cris Carampa (spamto:cris119_at_operamail.com) when they kick at your front door | how you gonna come ? with your hands on your head | or on the trigger of your gun ?Received on Thu Jul 20 2006 - 09:15:31 CEST