Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: SELECT statement issue

Re: SELECT statement issue

From: Ganesh Raja <ganesh.raja_at_gmail.com>
Date: Thu, 14 Sep 2006 22:25:51 +0200
Message-ID: <f754edf0609141325m757ab639xf0da9ee59b502b4@mail.gmail.com>


Select Decode (values, 'XYZ', (Select ....), 'ABC', (Select .....), (Select ...))

          <<IF>     <Equalto>                       <elseif>
<else>

HTH

On 9/14/06, Harvinder Singh <Harvinder.Singh_at_metratech.com> wrote:
>
> Hi,
>
>
>
> We are porting the application from SQL Server to Oracle, we have lot of
> queries in the xml file and the application read the queries from the file.
>
> In some scenarios we have following construct in sql server where we are
> checking the value and depending upon it running one of the 2 sql's:
>
> If (values = 'xyz')
>
> Begin
>
> Selectů.
>
> End
>
> Else
>
> begin
>
> Selectů..
>
> End
>
>
>
> Oracle somehow don't like this construct and giving error : ORA-00900:
> invalid SQL statement
>
>
>
> What is the way to port this to oracle?
>
>
>
> Thanks
>
> --Harvinder
>
>
>

-- 
-----------------------------------------------------------
http://iyertalks.blogspot.com/

--
http://www.freelists.org/webpage/oracle-l
Received on Thu Sep 14 2006 - 15:25:51 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US