I would like to know if there is a way to compare two similar but not
exactly the same strings in a where clause. I am using the INSTR
function to do this as below but it does not do a valid comparision.
Using ColumnA = ColumnB is not an option here nor is PL/SQL.
The query below returns row one of the table but I do not want this row
returned.
select * from My_Table where INSTR(ColumnA, ColumnB) = 0
The row is returned because it finds that Dept1 is in the string of
ColumnA. Is there a way so that the correct comparison of
Dept1--->Dept1C is performed and that row is therefore not returned?
My_Table
ColumnA ColumnB
----------- -----------
Dept1C,Dept99 Dept1
Any help would be much appreciated.
Thanks,