April 11, 2013 at 2:36 pm
I have two tables that are only somewhat related and would like to pull data from table 2 about the UserName in Table 1.
Table1 has UserLogin and logged in.
The User Login in looks like: Domain\UserName and varies in length 14-29 Characters
The username is part of the employees name.
Table 2 has employee information that I want to link to:
EmployeeID, FName, LName, Phone etc…..
April 11, 2013 at 2:42 pm
you can do what some people call an exotic join...joins that are not T1.field = T2.field
but things like :
ON UserName = REPLACE(Userlogin,'\Domain','')
or on char index/patindex
ON (CHARINDEX(UserName , Userlogin) != 0)
Lowell
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply