Hello,
I'm working on a DB on which I can run only SELECT commands, so I'd
like to modify these UPDATE commands, into one SELECT command, which
makes use of IF statements:
update Table
set field1=field2
update Table
set field1=field3
where 'condition'
I've modified it into this:
select *,
IF(condition,field3,field2)
END IF as newField
from Table
I tried this way too:
select *,
IF(condition) THEN field3
ELSE field2
END IF as newField
from Table
It doesn't work... I hope you can help me
Thank you very much in advance
Carmelo