Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Finding data with spaces in them.
I've got this rippa of a script that finds codes in our database which
contain spaces and the similar code that doesn't so that we can see that if
we remove the space in the code's name, it will conflict with another code,
one that has is similar but without the space(s):
SELECT STYLECODE, ACTIVE FROM STYLE WHERE REPLACE (STYLECODE, ' ', '')
IN (SELECT REPLACE (STYLECODE, ' ','')
FROM STYLE
GROUP BY REPLACE (STYLECODE, ' ','')
HAVING COUNT (*)>1);
Output is:
STYLECODE ACTIVE
1688W 0 1691W 0 1688W 1 1691W 1 BOXPVC 0 SAT 4346 0 SAT4346 1 RIB 1731 1 RIB1731 1 BOX PVC 1 RCS 001 1 RCS001 1 VAL9505 0 VAL9505 1
What I'd like to know is, how does it work??
-- Julian MilanoReceived on Thu Nov 20 2003 - 20:19:46 CST