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"

Who is Participating?
sdstuberConnect With a Mentor Commented:
where t.ssnlast4 = left(t2.ssn, 4)
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.