Here is the whole query.  I had it set up earlier such that it only had
the first two conditions: match the badge or name (w/o MI)...that worked
fine.  Now, even though I added the other two conditions, the query
still comes up with the same number of records.  The record I'm checking
for has the incorrect badge number (so it won't show up based on that)
and the name is "Rose A" (first name) "Riggins" (last name).  There is a
"Rose" (first name) "Riggins" (last name) in the other table.  Why
doesn't the query pick up the match?


SELECT Vendor_Circuit_Number, Total_Employee_List.ISP_User_Last_Name,
Total_Employee_List.ISP_User_First_Name, Valid_Employees.Last_Name,
Valid_Employees.First_Name
FROM Total_Employee_List INNER JOIN Valid_Employees ON
(Total_Employee_List.ISP_Employee_Badge_Number=Valid_Employees.[Badge
Number]) 
Or
(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) =
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) =
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

Get the mailserver that powers this list at 
http://www.coolfusion.com

                        

Reply via email to