Path: dp-news.maxwell.syr.edu!spool.maxwell.syr.edu!drn.maxwell.syr.edu!news.maxwell.syr.edu!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: Jeremy <newspostings@hazelweb.co.uk>
Newsgroups: comp.databases.oracle.server
Subject: Re: Char String printing Order
Date: Mon, 6 Jun 2005 15:34:42 +0100
Lines: 45
Message-ID: <MPG.1d0e6f559b6aa946989ea7@news.individual.net>
References: <1118060289.272545.248560@o13g2000cwo.googlegroups.com> <1118063105.019288.123470@g47g2000cwa.googlegroups.com> <1118068000.444007.83800@g47g2000cwa.googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset="iso-8859-15"
Content-Transfer-Encoding: 7bit
X-Trace: individual.net PDYU7AXJe7zBAL63Gcqy7ga8l7bI96SDGeeV+gbPtdC2UAEqwm
User-Agent: MicroPlanet-Gravity/2.60.2060
Xref: dp-news.maxwell.syr.edu comp.databases.oracle.server:244334

In article <1118068000.444007.83800@g47g2000cwa.googlegroups.com>, 
Carlos says...
> An alternative to function creation.
> 
> SQL> SELECT SUBSTR('ORACLE',1,1) FROM DUAL
>   2  UNION ALL
>   3  SELECT SUBSTR('ORACLE',2,1) FROM DUAL
>   4  UNION ALL
>   5  SELECT SUBSTR('ORACLE',3,1) FROM DUAL
>   6  UNION ALL
>   7  SELECT SUBSTR('ORACLE',4,1) FROM DUAL
>   8  UNION ALL
>   9  SELECT SUBSTR('ORACLE',5,1) FROM DUAL
>  10  UNION ALL
>  11  SELECT SUBSTR('ORACLE',6,1) FROM DUAL;
> 
> S
> -
> O
> R
> A
> C
> L
> E


OR...in sqlplus 

set serveroutput on size 999999

declare 
 i number;
 str varchar2(6) := 'ORACLE';
begin
  for i in 1..length('ORACLE')
  loop
    dbms_output.put_line(substr(str,i,1));
  end loop;
end;
/


-- 

jeremy
