newtomysql
Technical User
Dear All,
I got a simple sql where I need to add an extra if clause. I am getting sytax error here. What I want to do here is that get all the lines where serial is '1234 and status can be either 'y' or 't' and if the serialID is not 500 then I want to if the outlet is also not 1. How can I do this query please below is my query?.
select * from tblCentral where serial='1234' and (serialStatus='y' or stockStatus='t') and
if serialID!=500 then
outletID!=1
end if;
I got a simple sql where I need to add an extra if clause. I am getting sytax error here. What I want to do here is that get all the lines where serial is '1234 and status can be either 'y' or 't' and if the serialID is not 500 then I want to if the outlet is also not 1. How can I do this query please below is my query?.
select * from tblCentral where serial='1234' and (serialStatus='y' or stockStatus='t') and
if serialID!=500 then
outletID!=1
end if;