Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
IIF() like Function in Oracle?
Message
From
18/05/1999 09:35:15
 
 
To
17/05/1999 20:57:05
Cindy Winegarden
Duke University Medical Center
Durham, North Carolina, United States
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00219769
Message ID:
00219990
Views:
23
I tried the following code and it did not work:
select case when vendor_code = 1 then 'One' when vendor_code = 2
then 'Two' else 'Whatever' end from sites
and

select case when vendor_code = 1 then result('One') when vendor_code = 2
then result('Two') else result('Whatever') end from sites

I did not see the CASE statement as an option in the Oracle book
I have or the on-line docs. The above code was run directly from
T.O.A.D. (interactive tool for Orcale developers). The error message
I get is: ORA00923 - FROM keyword not found where expected...


>Tom,
>
>SELECT case when search-condition(1) then result(1) ;
> when search-condition(2) then result(2) ;
> else result(x) end ;
> FROM Table
>
>(courtesy of Stephen Russell
>Memphis Visual FoxPro user Group)
>
>
>
>
>>Is there a function in Oracle that emulates what
>>the VFP IIF() function does? The closest thing
>>I have seen is the DECODE() function.
>>
>>What I need to do is as follows in a SQL passthru statement:
>>
>>IIF(num_trys > max_trys, 'True', 'False') AS fieldname
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform