July 18, 2005 at 10:39 am
Very basic question here, but I am very new to SQL. I have this statement in my stored procedure but it tells me there is an error near and
WHERE Staff_Type = "I" or "P" AND Status = 1
July 18, 2005 at 10:44 am
Use the in operator. Change this to
WHERE Staff_Type in ('I', 'P')
July 18, 2005 at 10:47 am
u r missing the name of yr fld in the query:
WHERE (Staff_Type = 'I' OR Staff_Type = 'P') AND Status = 1
u may also rewrite the above as:
WHERE Staff_Type IN ('I', 'P') AND Status = 1
July 18, 2005 at 11:10 am
Also make sure you use single quotes and not double....
**ASCII stupid question, get a stupid ANSI !!!**
July 18, 2005 at 11:42 am
Thank you all!
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply