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

  • From: japplewhite@xxxxxxxxxxxxx
  • To: "'Oracle-L@xxxxxxxxxxxxx'" <oracle-l@xxxxxxxxxxxxx>
  • Date: Thu, 3 Dec 2009 09:27:34 -0600

Chris,

Use the Chr(xx) function and increment the xx digit argument.  Chr(65) = 
A, Chr(66) = B, and so on.

Jack C. Applewhite - Database Administrator
Austin I.S.D. - MIS Department
512.414.9715 (wk)  /  512.935.5929 (pager)




From:
"Taylor, Chris David" <ChrisDavid.Taylor@xxxxxxxxxxxxxxx>
To:
"'Oracle-L@xxxxxxxxxxxxx'" <oracle-l@xxxxxxxxxxxxx>
Date:
12/03/2009 09:22 AM
Subject:
Increment an alphabetic variable in a PL/SQL loop?
Sent by:
oracle-l-bounce@xxxxxxxxxxxxx



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@xxxxxxxxxxxxxxx
 


Other related posts: