Turn the character into it's numeric ASCII value, increment the numeric
value, then turn the new into it's corresponding character.
<cfset NextCharacter = Chr(Asc(myquery.max_temp) + 1)>
If you need to wrap Z to A or somesuch, you can get creative using the mod
function or a simple CFIF.
Jim
-----Original Message-----
From: Herman, John <[EMAIL PROTECTED]>
To: '[EMAIL PROTECTED]' <[EMAIL PROTECTED]>
Date: Saturday, May 13, 2000 10:16 AM
Subject: Increment Strings
>I have a database that increments on letters of the alphabet. Is there a
>way in CF to return the next letter in a sequence, i.e. the following
query,
>
>SELECT Max(Foo) AS max_temp
>FROM bar
>
>Returns: 'E'
>
>I want to increment that to the value 'F' and insert a new record with
that
>value.
>
>TIA,
>
>John C. Herman
>Webmaster
>RDO Equipment Co.
>(701) 239-8785
------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.