Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
IIF() like Function in Oracle?
Message
De
18/05/1999 20:11:13
Cindy Winegarden
Duke University Medical Center
Durham, Caroline du Nord, États-Unis
 
 
À
18/05/1999 09:35:15
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00219769
Message ID:
00220251
Vues:
31
Sorry it didn't work. It was a hint I'd saved but never tried. (My ORACLE books are at work.)


>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform