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 -> Finding data with spaces in them.

Finding data with spaces in them.

From: Prince Of Thieves <thief_NOSPAM_at_hotmail.com>
Date: Fri, 21 Nov 2003 13:19:46 +1100
Message-ID: <tyevb.60$GB2.2154@nnrp1.ozemail.com.au>


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 Milano
Received on Thu Nov 20 2003 - 20:19:46 CST

Original text of this message

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