I’d like to select columns and join tables where the join condition concatenates the selected columns in additions to dots. For e.g.
SELECT TBL1.ID,
TBL1.COUNTRY As A,
TBL1.STATE As B,
TBL1.CODE As C
FROM TBL1, TBL2
WHERE TBL2.ID = A+'.'+B+'.'+C
The data is so that TBL2.ID looks like ‘US.NY.61‘ where US is TBL1.COUNTRY, NY is TBL1.STATE, etc.
UPDATE: SQl fiddle: http://sqlfiddle.com/#!3/26b6b/4
How about trying something like this
Added code to cast the 4 fields as varchar before combining and comparing them.