You'll need some "like"s instead of =s, and you probably will have
trouble with comparing concatenated strings with the wild cards in the
middle. How about instead you check individual fields, something like
this:
(trim(Total_Employee_List.ISP_User_First_Name)+trim(Total_Employee_List.
ISP_User_Last_Name)=trim(Valid_Employees.First_Name)+trim(Valid_Employee
s.Last_Name))
OR
(
trim(Total_Employee_List.ISP_User_First_Name)+' %' like
trim(Valid_Employees.First_Name) and
'%'+trim(Total_Employee_List.ISP_User_Last_Name) like
trim(Valid_Employees.Last_Name)
)
OR
(
trim(Total_Employee_List.ISP_User_First_Name) like
trim(Valid_Employees.First_Name) +' %' and
trim(Total_Employee_List.ISP_User_Last_Name) like
'%'+trim(Valid_Employees.Last_Name)
)
That should be pretty close.
-----Original Message-----
From: Conaway, Amy C [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 13, 2003 09:51
To: SQL
Subject: odd problem
Can anyone see a reason why this won't find all the name matches while
taking into account middle initials being entered with the first name
(separated by a space)? Thx!
(trim(Total_Employee_List.ISP_User_First_Name)+trim(Total_Employee_List.
ISP_User_Last_Name)=trim(Valid_Employees.First_Name)+trim(Valid_Employee
s.Last_Name))
OR
(trim(Total_Employee_List.ISP_User_First_Name)+'
%'+trim(Total_Employee_List.ISP_User_Last_Name)=trim(Valid_Employees.Fir
st_Name)+trim(Valid_Employees.Last_Name))
OR
(trim(Total_Employee_List.ISP_User_First_Name)+trim(Total_Employee_List.
ISP_User_Last_Name)=trim(Valid_Employees.First_Name)+'
%'+trim(Valid_Employees.Last_Name))
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=6
Subscription:
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=6
Your ad could be here. Monies from ads go to support these lists and provide more
resources for the community.
http://www.fusionauthority.com/ads.cfm