Re: Simple SQL question



--
-- in 10g
-- Thanks to Aketi. http://oraclesqlpuzzle.hp.infoseek.co.jp/
--
SCOTT > ed
Wrote file afiedt.buf

1 select regexp_replace('the cat sat on the mat', ' {2,}', '
')
2* from dual
SCOTT > /

REGEXP_REPLACE('THECAT
----------------------
the cat sat on the mat

SCOTT > ed
Wrote file afiedt.buf

1* select regexp_replace('the cat sat on the mat',' +',' ')
from dual
SCOTT > /

REGEXP_REPLACE('THECAT
----------------------
the cat sat on the mat

--
-- In 9i
--
SCOTT > ed
Wrote file afiedt.buf

1* select replace(replace('the cat sat on the mat',' ','
'),' ',' ') from dual
SCOTT > /

REPLACE(REPLACE('THECA
----------------------
the cat sat on the mat

.



Relevant Pages

  • Re: Replacing a whole paragraph
    ... The cat sat on the mat. ... #2 Now is the time for all good men to attend the next party. ... This should allow you to delete #2 para no matter how long it is, ...
    (microsoft.public.word.general)
  • Re: The Doctrine of Feline Sedentation.
    ... Sat on a Mat" in World Religions. ... > The Doctrine of Feline Sedentation. ... > course mean that the cat literally sat on the mat. ... > floor, ...
    (rec.pets.cats.anecdotes)
  • Re: The Doctrine of Feline Sedentation.
    ... The Doctrine of Feline Sedentation. ... How would Christians deal with "The cat sat on the mat" if it appeared ... floor, ...
    (rec.pets.cats.anecdotes)
  • Re: The Doctrine of Feline Sedentation.
    ... The Doctrine of Feline Sedentation. ... How would Christians deal with "The cat sat on the mat" if it appeared ...
    (rec.pets.cats.anecdotes)
  • The Doctrine of Feline Sedentation.
    ... The Doctrine of Feline Sedentation. ... How would Christians deal with "The cat sat on the mat" if it appeared ...
    (rec.pets.cats.anecdotes)