Toad World® Forums

If Statement or calculated fields

I am a wiz in MS Access and Hyperion, but I can’t figure out how to do if statements in Toad for Data Analysts. I want to return a value when a field is not null.

So my field has the value of 0099000 and I want to return the value of Yes.

In Access I would have done this by creating a variable in the query design view:

ABA: IIf([ABANo] Is Not Null,“Yes”)

how do I do this in TOAD?

I am sure there are other ways to do this but you can try the following in a calculated field:


NVL2 Defined:
NVL2 lets you determine the value returned by a query based on whether a specified
expression is null or not null. If expr1 is not null, then NVL2 returns expr2. If expr1
is null, then NVL2 returns expr3.