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: Prince Of Thieves <thief_NOSPAM_at_hotmail.com>
Date: Wed, 26 Nov 2003 15:15:59 +1100
Message-ID: <RJVwb.65$wh7.3136@nnrp1.ozemail.com.au>


Problem is....I'm not an Oracle guru. I just know the basic SQL and the following are unknown to me so I hope someone can explain what they do:

COUNT (*)>1 How does this work?

SELECT REPLACE (STYLECODE, ' ','') What does this line do?

Thanks.

-- 

Julian Milano


"Hans Forbrich" <forbrich_at_yahoo.net> wrote in message
news:3FBD7BE6.17493315_at_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 Tue Nov 25 2003 - 22:15:59 CST

Original text of this message

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