there!
I’m writing mysql script in mySQl Front 4.1.
I have problem with if then, case statements.
I have next code:
set @prodID = -1;
select @prodID = productID
from partid_to_productid
where PartID= 8;
case @prodID
WHEN NULL then select 0;
else select 3;
end case
Front doesn’t want to execute it. Why?
Can someone explain me what is wrong here?
The
SELECTgoes outside theCASE:Actually, that’s not returning 0 for me as I expect when testing. Instead try: