Well, if you wanted to increment a field from it's current maximum value,
you could:
UPDATE TABLE
SET COL1 = '#value#'
,COL2 = '#value#'
,COL3 = ((SELECT MAX(COL3)
FROM TABLE) + 1)
WHERE COL4 = #value#
HTH
--
Scott Van Vliet
Senior Analyst
SBC Services, Inc.
ITO Enterprise Tools
Office: 858.886.3878
Pager: 858.536.0070
Email: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
-----Original Message-----
From: Eric J Hoffman [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 01, 2002 8:30 AM
To: CF-Talk
Subject: SQL Update Increment Value
Is there a way to increment an int field in sql via the update statement
without doing a select query in cf, then an update? Thanks for filling
the hole.
Regards,
Eric J. Hoffman
Director of Internet Development
DataStream Connexion, LLC
(formerly Small Dog Design)
______________________________________________________________________
This list and all House of Fusion resources hosted by CFHosting.com. The place for
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists