Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Finding data with spaces in them.
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...Received on Tue Nov 25 2003 - 22:15:59 CST
> 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.
![]() |
![]() |