• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 167
  • Last Modified:

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"

0
isaacr25
Asked:
isaacr25
1 Solution
 
sdstuberCommented:
right(t2.ssn,4)
0
 
chapmandewCommented:
where t.ssnlast4 = left(t2.ssn, 4)
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now