SELECT DISTINCT
Positions.Issuer_Name
FROM
Positions
LEFT JOIN
(
SELECT DISTINCT
[Assetid]
FROM
Report
) Report ON
Report.[Assetid] = Positions.CUSIP //here instead of Report.[Assetid] i need to use `"right([Assetid], Len([Assetid])-1)"`
i need to use "right([Assetid], Len([Assetid])-1)" this which remove 1st letter and compare "Positions.CUSIP"
which is the better way to write this ?
instead of writing like
" ) Report ON
Report.right([Assetid], Len([Assetid])-1) = Positions.CUSIP"
should i declare variable and do "right([Assetid], Len([Assetid])-1)" first but how can i use it in JOIN then?
It depends on what you are trying to do, do you want to compare based on the
right()value at that point or do you want theright()value prior to:OR