I need some help on a query. What I am trying to do is have the query look at Employees and find all the preferred names that are not in the CURRENT table and update the CURRENT table. My problem right now is that all of the fields that need to be updated in CURRENT are just blank so the query isn't recognizing them so it doesn't update anything. Is there an SQL statement I can add that will recognize that a cell, preffered_name, in CURRENT is 'blank' but in Employees it is John and it will then update it? Thanks.
Code:
UPDATE [CURRENT]
INNER JOIN Employees ON CURRENT.TechID = Employees.TechID
SET
[CURRENT].PREFFERED_NAME = [Employees].PREFERRED_NAME,
[CURRENT].Employee_Name = [Employees].emplname,
[CURRENT].Prefix = [Employees].Prefix,
[CURRENT].Suffix = [Employees].Suffix
WHERE
(
((CURRENT.PREFFERED_NAME)<>(Employees.PREFERRED_NAME))
AND
((Employees.Preferred_Name)<>"")
AND
((CURRENT.TechID)=[Employees].[TechID])
);