mardi 5 janvier 2016

Running the "if else" query

I run the following query :

select field1 f1, field2 f2, case when field3 >1 and field 4 > 0 than field3 else field4 as f34, field5 f5

This query dosn`t work (I get syntax error near case) What is the correct way to implement if else in sql?

Aucun commentaire:

Enregistrer un commentaire