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

Re: Finding data with spaces in them.

From: Hans Forbrich <forbrich_at_yahoo.net>
Date: Fri, 21 Nov 2003 02:42:24 GMT
Message-ID: <3FBD7BE6.17493315@yahoo.net>


Prince Of Thieves wrote:
>
>
> SELECT STYLECODE, ACTIVE FROM STYLE WHERE REPLACE (STYLECODE, ' ', '')
> IN (SELECT REPLACE (STYLECODE, ' ','')
> FROM STYLE
> GROUP BY REPLACE (STYLECODE, ' ','')
> HAVING COUNT (*)>1);
>

You might find that a bit of prettyprint formatting could help you understand the code.

Try this

SELECT STYLECODE, ACTIVE
  FROM STYLE
 WHERE REPLACE (STYLECODE, ' ', '')

            IN (SELECT REPLACE (STYLECODE, ' ','') 
                  FROM STYLE
                 GROUP BY REPLACE (STYLECODE, ' ','')
                HAVING COUNT (*)>1)

;

Analyze the subselect first, understand what it does, and - if necessary look up the IN operator. Received on Thu Nov 20 2003 - 20:42:24 CST

Original text of this message

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