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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

convert code from access to Sql

Status
Not open for further replies.

access101

Programmer
Sep 4, 2010
68
US
im trying to convert code from access to Visual studio dataset query but its not recognizing my LIKE statement

SELECT Staff.Deactivate, Staff.Employee, IIf([Position] Like "*O*","Opener") AS [Open], Staff.Rate1, Staff.Rate2, Staff.Salary, Staff.Availability
FROM Staff
WHERE (((Staff.Deactivate)=False));
 
hi,

Maybe...
Code:
, IIf([Position] Like "*O*","Opener") 

, case when [Position] like '%0%' then 'Opener' end


Skip,
[sub]
[glasses]Just traded in my OLD subtlety...
for a NUance![tongue][/sub]
 
What skip said, and....

Code:
WHERE Staff.Deactivate =0;


-George
Microsoft SQL Server MVP
My Blogs
SQLCop
twitter
"The great things about standards is that there are so many to choose from." - Fortune Cookie Wisdom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top