hope everyone had a good weekend.
I have a table (tableA
) with one column that has values such as the below:
Column1:
xyz-12345678
rdr-32343234
fgm-23423423
Then i have another table (tableB
) with one column that has all the values in tableA.column1
and then some more such as the below
column1:
rfxyz-1234567800012015-01-029
grrdr-3234323485832015-02-037
tyfgm-2342342343432014-12-148
As you can see tableA.column1
has its value embedded in tableB.column1
. I wrote a subselect query such as below to identify all instances in tableB.column1
that have tableA.column1
values embedded in them, but i get 0 results and no errors. I can clearly see that there are row values in tableA.column1
that are present in tableB.column1
but i am unsure what i have done wrong here to result in no errors and no results, my SAS proc sql is below:
PROC SQL;
select i.*
from tableA i
where exists (select *
from tableB
where i.column1 like '%'||column1||'%'
)
;
quit;
Any help on this would be greatly appreciated as my SAS knowledge is not really strong.