I have 2 tables that I an doing a join and as part of that I need to compare 2 strings from both tables and create a red, yellow, green indication but I am stuck.
So I am comparing strings that look like this.
In tableA the filed may look like.
In tableB the field will look like
So as you can see some will have ??? and some will be exact.
So the compare would be something like
CASE WHEN 10.20.111.04.040 >= 10.20.???.04.040 THEN 'Something'
I need to ignore the .111. and .???. to get the correct match.
I have tried to replace the ??? with %%% i.e. REPLACE(xxx,'???',%%%')
I can't really use SUBSTRING since I have other numbers in different values...