Re: SQLPLUS Oracle 8i query
From: Cris Carampa <cris119_at_operamail.com>
Date: Thu, 20 Jul 2006 10:35:45 +0200
Message-ID: <44bf4062$0$969$5fc30a8_at_news.tiscali.it>
Date: Thu, 20 Jul 2006 10:35:45 +0200
Message-ID: <44bf4062$0$969$5fc30a8_at_news.tiscali.it>
vernalGreens_at_gmail.com wrote:
> If a user selected pqr from a dropdown on the webpage, only then I want
> the city statement to run.
>
> How can I achieve this in SQLPLUS (I think the syntax in the above
> query is incorrect). I'm using oracle 8i. Can I use conditional if in
> SQLPLUS?
There's still no need for procedural statements here:
select * from tablename
where country='abc'
and
(
('&&1'='pqr' and city='xyz')
or
('&&1'!='pqr')
) ;
-- 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 - 10:35:45 CEST