Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Query Help Needed

Query Help Needed

From: GZ <gz_at_yahoo.com>
Date: Tue, 02 Oct 2001 18:58:39 -0400
Message-ID: <3BBA469F.793AB609@yahoo.com>


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,

Greg Received on Tue Oct 02 2001 - 17:58:39 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US