I am trying to join two tables that have similar fields, but in slightly different formats. I was previously using something along the lines of
like '%*%' Then SUBSTRING(b.fieldname,CHARINDEX(b.fieldname,'*',1)+1,9)
However the format has now changed and I am struggling to put something together.
However the number of characters in both could vary so cant use that.
Is there some code that could be written that's something like:
A – From the space use the value up to and including the 2nd * (BD8K1 is at the beginning of every value in table A so could potentially use from character 7)
B – Use the value up to and including the 2nd *
Any help would be very much appreciated.