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

Complicated WHERE statement needs %!!! HELP!!!

Status
Not open for further replies.

Artesha

Technical User
Joined
Oct 25, 2002
Messages
8
Location
US
This is the jest of my query,,

Select *
From Prospecttbl
Where Not Exists(Select * From Membertbl Where Prospecttbl.LastName = Membertbl.LastName and Prospecttbl.FirstName=Membertbl.FirstName)

The two fields have to match identically,, well, ive imported a table where the first name and middle name is merged into one field, which makes this statement null and void,, so i need some help with separating these into two diffent separate field OR another way to match the last name and the first 3 letters of the first name,, HELP!!!

Tesha
 
Could you do this?


Select *
From Prospecttbl
Where Not Exists(Select * From Membertbl Where Prospecttbl.LastName = Membertbl.LastName and Left(Prospecttbl.FirstName,3)=Left(Membertbl.FirstName,3))
CharlesCook.com
ADP - PeopleSoft - SAP
ReportSmith - Crystal Reports - SQR - Query - Access
Reporting - Interfaces - Data Mining
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top