Re: Increment an alphabetic variable in a PL/SQL loop?

From: Alisher Yuldashev <yuldashev_at_pythian.com>
Date: Thu, 03 Dec 2009 10:32:41 -0500
Message-ID: <4B17DA19.5050500_at_pythian.com>



declare
  var1 char;
begin
  for i in 65..90
  loop
    var1:=chr(i);
    dbms_output.put_line(var1);
  end loop;
end;

Thanks,

-- 
Alisher Yuldashev
Senior Oracle DBA
The Pythian Group - Ottawa, Canada
Web  : http://www.pythian.com



> Hey how can we increment an alphabetic variable in PL/SQL?
>
>
>
> Let's say I have var1 = 'A' for the first pass, but for the second
> pass, I want it to autoincrement to var1='B' and ultimately to 'Z'.
>
>
>
> I'm searching but its hard to find the right search terms to give me
> what I want.
>
>
>
>
>
> */Chris Taylor/*
>
> *Sr. Oracle DBA*
>
> Ingram Barge Company
>
> Nashville, TN 37205
>
> Office: 615-517-3355
>
> Cell: 615-354-4799
>
> Email: chris.taylor_at_ingrambarge.com <mailto:chris.taylor_at_ingrambarge.com>
>
>
>
> *CONFIDENTIALITY NOTICE**: This e-mail and any attachments are
> confidential and may also be privileged. If you are not the named
> recipient, please notify the sender immediately and delete the
> contents of this message without disclosing the contents to anyone,
> using them for any purpose, or storing or copying the information on
> any medium.*
>
-- http://www.freelists.org/webpage/oracle-l
Received on Thu Dec 03 2009 - 09:32:41 CST

Original text of this message