How to write an IF statement
Question

WHEN A IS NOT NULL THEN AA

WHEN A IS NULL AND B IS NOT NULL THEN C

ELSE NULL


if (A = false, AA, ??)


?? Does anyone know how to write the part?

This is used in SQL.

Hi,


Not sure if this is what you asked for, but following that logic:


if(A = false, AA, if(A = true and B = false, C, false))

thank you for your answer.

That's what I was looking for. Thank you for your help.

Hi @Biginner 


In this case, an If statement follow de right logic:

If(condition, true, false), an example is:

If(a=b, "A is similar to B", "It's not similar")

And you can put another if inside the main if, like @Carlos Ioliva answered

I hope it help you too.


Regards @Biginner 

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.