Link to home
Start Free TrialLog in
Avatar of isaacr25
isaacr25

asked on

Help with SQL query

I have a query which contains this line:

ON t1.SSN = right(t2.SSN, len(t2.SSN) - 1)

t1.SSN is now being changed to SSNLast4, which will contain the last 4 of the SSN instead of the entire SSN. So, how do I change the code on the right of the equal sign accordingly?

I'm trying to say "ON t1.SSNLast4 = Last4 of t2.SSN"

ASKER CERTIFIED SOLUTION
Avatar of Sean Stuber
Sean Stuber

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
where t.ssnlast4 = left(t2.ssn, 4)