Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query structuring help

Status
Not open for further replies.

newtomysql

Technical User
Apr 11, 2001
96
MY
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;
 
would you please kindly re-phrase this: "if the serialID is not 500 then I want to if the outlet is also not 1"

please try and say this a different way because it doesn't make sense

and neither does your query

r937.com | rudy.ca
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top