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!

Need SQL Syntax

Status
Not open for further replies.

gguerra3

IS-IT--Management
Feb 1, 2006
17
US
I'm trying to do a simple query on an employee table named Workforce1. I need to filter out all the records where lastname starts with an "*". I need help with the WHERE clause. This is for MS Access. Is this possible?

SELECT Workforce1.EmployeeNo, Workforce1.LastName, Workforce1.FirstName
FROM Workforce1
WHERE ??
ORDER BY Workforce1.EmployeeNo;
 
SELECT EmployeeNo, LastName, FirstName
FROM Workforce1
WHERE LastName LIKE '[*]*'
ORDER BY 1

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Worked fine , but I need the opposite.

WHERE 1st character of last name NOT equal to *

BTW, is there a reference manual for MS Access SQL (it does not seem to be compliant with other SQL's)

Thanks
 
WHERE LastName [!]NOT [/!]LIKE '[*]*'

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Worked Fine! Thanks.. Again does anyone know of a good reference for MS Access SQL. The help doesnt seem to have much..
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top