if tables have different collation

select v.domainacct, a.login, a.firstname afirst, v.firstname vfirst,
a.lastname alast, v.lastname vlast
–into ##temp
from dbo.Vacation2011 v
left outer join dbo.ADUserList a
on (v.lastname = a.lastname COLLATE SQL_Latin1_General_CP1_CI_AS
and v.firstname = a.firstname COLLATE SQL_Latin1_General_CP1_CI_AS)

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.