Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: SQL Serious Challenge # 1 - Probably Not Much Fun
To reverse strings, 8.1 and above,
if not 7.3.4
select reverse('FRED') from dual;
REVE
-- Regards Jonathan Lewis http://www.jlcomp.demon.co.uk The Co-operative Oracle Users' FAQ http://www.jlcomp.demon.co.uk/faq/ind_faq.html April 2004 Iceland June 2004 UK - Optimising Oracle Seminar "Noons" <wizofoz2k_at_yahoo.com.au> wrote in message news:73e20c6c.0403140330.19eb94a_at_posting.google.com...Received on Sun Mar 14 2004 - 14:00:26 CST
> Before you dismiss SQL to generate the reverse strings:
> PROMPT Quick and dirty, but it works. A non-existing substr is NULL.
> Purr>select substr(keyword,8,1)||substr(keyword,7,1)||
> 2 substr(keyword,6,1)||substr(keyword,5,1)||
> 3 substr(keyword,4,1)||substr(keyword,3,1)||
> 4 substr(keyword,2,1)||substr(keyword,1,1) drowyek,
> 5 keyword
> 6 from my_range;