Try this:
<cfquery name="q_maxletter">
SELECT Max(Foo) AS max_temp
FROM bar
</cfquery>
<cfset nNextChar = Chr(Asc(q_maxletter.max_temp) + 1)>
You will need to make sure you don't go past "z"
Duane Boudreau
CFExperts.Com
-----Original Message-----
From: Herman, John [mailto:[EMAIL PROTECTED]]
Sent: Saturday, May 13, 2000 12:14 PM
To: '[EMAIL PROTECTED]'
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.
------------------------------------------------------------------------------
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.