0

How to reproduce the following statement of MySQL in SOQL:

SELECT IF(1 = 2,'true','false');

I am trying to do the following:

select if(field1=null,false,true) as res from table

But it is showing me unknown parsing error.

Richa Sinha
  • 1,406
  • 15
  • 29

1 Answers1

1

That is not possible in SOQL. Not sure of the requirement here but you may use a formula field instead.

geekymartian
  • 645
  • 5
  • 11