Hi!
Here's the function:
-------------------------------------- snip
-----------------------------------------
create or replace
function reverse_string(iText in varchar2)
return varchar2 is
oText varchar2(2000);
begin
for i in 1 .. least(2000,length(iText))
loop
oText := oText || substr(iText,-i,1);
end loop;
return oText;
end;
/
-------------------------------------- snip
-----------------------------------------
-- Test:
select reverse_string('Hope this helps') from dual;
Andreas
> ----------
> Von: Miller, Jay[SMTP:[EMAIL PROTECTED]]
> Gesendet: Montag, 12. März 2001 22:17
> An: Multiple recipients of list ORACLE-L
> Betreff: Script for reversing a string?
>
> Before I reinvent the wheel, I was wondering if anyone has written a
> function that will reverse a string?
> Our auditors are requiring that Oracle passwords not contain the reverse
> of
> the user name and I was about to start writing this function when I
> decided
> to check here first.
>
> Thanks!
>
> Jay Miller
>
>
>
> -----Original Message-----
> Sent: Friday, March 09, 2001 3:26 PM
> To: Multiple recipients of list ORACLE-L
>
>
> It hasn't caused me any problems - have only tried it on this test server
> so
> far, and on my workstation.
>
> The workstation has Oracle 7.3. and 8.0.4 on it they have been running for
> over a year.
>
> I wouldn't try this on a production system! These are test databases
> only.
>
> I am just curious why the files are so fragmented.
>
> Regards,
> Patrice Boivin
> Systems Analyst (Oracle Certified DBA)
>
> Systems Admin & Operations | Admin. et Exploit. des systèmes
> Technology Services | Services technologiques
> Informatics Branch | Direction de l'informatique
> Maritimes Region, DFO | Région des Maritimes, MPO
>
> E-Mail: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
>
>
> -----Original Message-----
> From: Smith, Ron L. [SMTP:[EMAIL PROTECTED]]
> Sent: Friday, March 09, 2001 3:36 PM
> To: Multiple recipients of list ORACLE-L
> Subject: RE: Does NT write to random locations on disk?
>
> I wouldn't think you would want to reorg an Oracle tablespace with
> an NT
> defrag utility. You would corrupt the data.
> Ron Smith
> Database Administration
> [EMAIL PROTECTED]
>
>
> -----Original Message-----
> Sent: Friday, March 09, 2001 1:01 PM
> To: Multiple recipients of list ORACLE-L
>
>
> Using a little utility called contig I noticed that the Oracle 8.1.6
> datafiles on my test NT server are quite fragmented, an average of
> 177
> fragments per file, 118 fragments for the OEM repository datafile.
> The poor
> utility couldn't do anything with the database files, they are too
> large
> perhaps.
>
> These were created on an empty server, 8i release 2 went on it after
> a
> defrag, then the OEM. This is on a hard disk with 1.2G of free
> space, none
> of the datafiles come close to that.
>
> Why so many fragments? Oracle created those files in one pass, does
> NT
> write randomly to disk or what?
>
> Won't this have an impact on my NT database's performance?
>
> Oracle says tablespace fragmentation is not a big deal, but
> fragmentation at
> the OS level matters. Supposedly that's why NT and WndowsXX came
> with
> defragmentation tools.
>
> ???
>
> Is there a registry setting somewhere to tell NT to write
> contiguously to
> disk?
>
> TIA
> Patrice Boivin
> Systems Analyst (Oracle Certified DBA)
>
> Systems Admin & Operations | Admin. et Exploit. des systèmes
> Technology Services | Services technologiques
> Informatics Branch | Direction de l'informatique
> Maritimes Region, DFO | Région des Maritimes, MPO
>
> E-Mail: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
>
>
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> --
> Author: Boivin, Patrice J
> INET: [EMAIL PROTECTED]
>
> Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
> San Diego, California -- Public Internet access / Mailing
> Lists
> --------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from). You may
> also send the HELP command for other information (like subscribing).
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> --
> Author: Smith, Ron L.
> INET: [EMAIL PROTECTED]
>
> Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
> San Diego, California -- Public Internet access / Mailing
> Lists
> --------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from). You may
> also send the HELP command for other information (like subscribing).
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> --
> Author: Boivin, Patrice J
> INET: [EMAIL PROTECTED]
>
> Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
> San Diego, California -- Public Internet access / Mailing Lists
> --------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from). You may
> also send the HELP command for other information (like subscribing).
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> --
> Author: Miller, Jay
> INET: [EMAIL PROTECTED]
>
> Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
> San Diego, California -- Public Internet access / Mailing Lists
> --------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from). You may
> also send the HELP command for other information (like subscribing).
>
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Haunschmidt Andreas VASL/FAS
INET: [EMAIL PROTECTED]
Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
San Diego, California -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing).