Avatar of Jim Metcalf
Jim Metcalf
Flag for United States of America asked on

help with query

I need to do a join on two fields but only part of the data in the fields.
the field is 18 digits long but I need the join to be dependent on only the first ten digits.

example.
2 account id's below

000000000055555555
000000000066666666

I need them to match by the first ten digits so the two above referenced accounts would result in a match
Microsoft SQL Server

Avatar of undefined
Last Comment
Jim Metcalf

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Scott Pletcher

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
SOLUTION
Kanti Prasad

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
ste5an

Review your model. Looks like a violation of 1NF.
Jim Metcalf

ASKER
Worked like a charm Scott.
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy