Hi All,
My update statement doesn't seem to be working. I want to update JobStatus to Active only if ContactLastName OR ContactFirstName meet the criteria below. Does my statement look correct? Thank you in advance.
UPDATE j
SET JobStatus = 'Pending'
FROM Jobs j
JOIN Contacts c ON j.JobSuperID = c.ContactID
WHERE (j.JobStartDate between '7/1/2009' AND '8/31/2009')
AND (Len(ContactlastName) <> 1 OR ContactLastName NOT LIKE '%know%' OR Len(ContactFirstName) <> 1 OR ContactFirstName NOT LIKE '%know%' OR ContactLastName NOT LIKE '%sure%' OR ContactFirstName NOT LIKE '%sure%')
My update statement doesn't seem to be working. I want to update JobStatus to Active only if ContactLastName OR ContactFirstName meet the criteria below. Does my statement look correct? Thank you in advance.
UPDATE j
SET JobStatus = 'Pending'
FROM Jobs j
JOIN Contacts c ON j.JobSuperID = c.ContactID
WHERE (j.JobStartDate between '7/1/2009' AND '8/31/2009')
AND (Len(ContactlastName) <> 1 OR ContactLastName NOT LIKE '%know%' OR Len(ContactFirstName) <> 1 OR ContactFirstName NOT LIKE '%know%' OR ContactLastName NOT LIKE '%sure%' OR ContactFirstName NOT LIKE '%sure%')