
September 27th, 2004, 07:07 AM
|
|
Registered User
|
|
Join Date: Mar 2004
Posts: 8
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
return values like other values
Hi,
I have two tables. Both tables have a FirstName and a LastName field. I can return the results where (LastName = LastName) and (FirstName = FirstName). However in one table some of the FirstName values are shortened ie Pat is P etc.
Is there some way (its prob using LIKE but i can't get it right) I can write the below query so that it returns values where the first letter of FirstName in one table equals the first letter of FirstName in the second table.
SELECT tbl2.FirstName, tbl2.LastName, SALARY.[Employee No]
FROM SALARY INNER JOIN tbl1 ON (SALARY.LastName = tbl2.LastName) AND (SALARY.FirstName = tbl2.FirstName)
Cheers for all help.
|