HI All,

I am trying to join 2 tables in a select clause where the primary key of the master is say

123456

and the secondary table has a column (not the primary column) where it is made up of the form

RDS123456A Where 123456 corresponds to the primary key of the Master.

I thought that joining using

t1.Key innerJOIN
dbo.RPA_DAT rp ON substring(rp.DAT, 4, 6)

but SQL Server doesn't like it