I need to search the column value from one table with column value of another table.
For example
MyTable
Col1 Col2
AAA 1
BBB 2
CCC 3
MyTable2
Col1 Col2
GHKGH AAAh 1
dhsjsBvd 2
bdnd CCC b 3
I need to search the col1 value from MyTable in col1 value of MyTable2.
I dont want to hard code the string but take the value from table.
Tried using instr
and regex_instr
, but these functions don't allow column values in the pattern to search.
I am using oracle 10g. TIA
Tested example here: http://sqlfiddle.com/#!4/037ffe/3
Full example including DDL:
Resultset: