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: Please HELP about string function

Re: Please HELP about string function

From: Michel Cadot <micadot{at}altern{dot}org>
Date: Sun, 5 Aug 2007 12:11:38 +0200
Message-ID: <46b5a259$0$30781$426a34cc@news.free.fr>

"wajim" <wajim29_at_hotmail.com> a écrit dans le message de news: 1186305496.971876.67700_at_g4g2000hsf.googlegroups.com... On 5 août, 06:36, "Michel Cadot" <micadot{at}altern{dot}org> wrote:

> "wajim" <waji..._at_hotmail.com> a écrit dans le message de news: 1186275792.494266.14..._at_22g2000hsm.googlegroups.com...

> | Hi all, can somebody help me with this string manip...
> | the question is:
> |
> | Write a select statement that alters
> | 'Where there are spaces put * and for tabs put +'
> | TO
> | 'Where*there*are*spaces*put***and*for*tabs+put*+'.
> |
> | I have tried something but get an error message:
> |
> | Select TRANSLATE ('Where there are spaces put * and for tabs put +', '
> | ', '*', ' ', '+')
> | >From dual;
> |
> | Thanks in advance...
> |
>
> Error? I don't see any error in your post.
>
> SQL> Select TRANSLATE ('Where there are spaces put * and for tabs'||chr(9)||'put +',' '||chr(9),'*+') from dual;
> TRANSLATE('WHERETHEREARESPACESPUT*ANDFORTABS'||
> -----------------------------------------------
> Where*there*are*spaces*put***and*for*tabs+put*+
>
> 1 row selected.
>
> Regards
> Michel Cadot

The error message is :
SQL>Select TRANSLATE ('Where there are spaces put * and for tabs put +', '
> | ', '*', ' ', '+')
> | >From dual;

SQL> Select "Where there are spaces put * and for tabs put +"

       *
ERROR at line 1:
ORA-00972: identifier is too long

No relation between the 2 queries.
No relation between the question and the error from second query. Double quotes enclose identifier.
Single quotes enclose string litteral.
Of course, you think Oracle version is irrelevant otherwise you post it, doesn't it?

Regards
Michel Received on Sun Aug 05 2007 - 05:11:38 CDT

Original text of this message

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