Dan
Try this
SET VAR vStart TEXT = ('12345C')
SET VAR vGetNumber TEXT = (SKEEPI(.vStart,'1234567890'))
SET VAR vGetLetter TEXT = (SKEEPI(.vStart,'ABCDEFGHIJKLMNOPQRSTUVWXYZ'))
SET VAR vIChar = (ICHAR(.vGetLetter))
SET VAR vNxtChar = (.vIChar + 1)
SET VAR vNxtLetter = (CHAR(.vNxtChar))
SET VAR vEnd = (LUC((.vGetNumber + .vNxtLetter)))
Buddy
From: [email protected] <[email protected]> On Behalf Of Dan
Goldberg
Sent: Monday, May 17, 2021 4:38 PM
To: [email protected]
Subject: Re: [RBASE-L] - Increment letters
Thx it looks like I need to get up to par on char ☺️
Dan Goldberg
MIS Manager
Lance Campers
_____
From: [email protected] <mailto:[email protected]>
<[email protected] <mailto:[email protected]> > on behalf of A.
Razzak Memon <[email protected] <mailto:[email protected]> >
Sent: Monday, May 17, 2021 12:48:20 PM
To: [email protected] <mailto:[email protected]>
<[email protected] <mailto:[email protected]> >
Subject: Re: [RBASE-L] - Increment letters
Dan,
Here's how ...
You can use the ICHAR function to capture the
ASCII integer value, increment by 1, then use the
CHAR function to return the letter value.
(ICHAR(arg))
Converts a single character, returning its corresponding ASCII integer value.
In the following example, the integer value of vichar is 65.
SET VAR vIChar = (ICHAR('A'))
(CHAR(integer))
Converts an ASCII integer value to its
corresponding character. This is not the same as the CHAR data type.
In the following example, the value of vchar1 is
A and the value of vchar2 is a.
SET VAR vChar1 = (CHAR(65))
SET VAR vChar2 = (CHAR(97))
Have fun!
Very Best R:egards,
Razzak.
At 03:22 PM 5/17/2021, Dan Goldberg wrote:
>I have a number with a letter suffix.
>
>12345C
>
>I need to increment it to the next letter. So it would be:
>
>12345D
>
>Has anyone done this before? I am drawing a blank…
>
>TIA
>
>Dan Goldberg
--
For group guidelines, visit
http://www.rbase.com/support/usersgroup_guidelines.php
---
You received this message because you are subscribed to the Google Groups
"RBASE-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected]
<mailto:[email protected]> .
To view this discussion on the web visit
https://groups.google.com/d/msgid/rbase-l/0MclnD-1m0XDw2ALJ-00Hwlr%40mrelay.perfora.net.
--
For group guidelines, visit
http://www.rbase.com/support/usersgroup_guidelines.php
---
You received this message because you are subscribed to the Google Groups
"RBASE-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected]
<mailto:[email protected]> .
To view this discussion on the web visit
https://groups.google.com/d/msgid/rbase-l/SJ0PR17MB44473CFE4EBB78E632384BDAAA2D9%40SJ0PR17MB4447.namprd17.prod.outlook.com
<https://groups.google.com/d/msgid/rbase-l/SJ0PR17MB44473CFE4EBB78E632384BDAAA2D9%40SJ0PR17MB4447.namprd17.prod.outlook.com?utm_medium=email&utm_source=footer>
.
--
For group guidelines, visit
http://www.rbase.com/support/usersgroup_guidelines.php
---
You received this message because you are subscribed to the Google Groups
"RBASE-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/rbase-l/003401d74b60%24be26b3b0%243a741b10%24%40comcast.net.