I don't think you can use the increment operator but you can "manually"
increment
UPDATE mytable
 SET foofield = foofield + 1
 WHERE fooid = 2

The foofield should be a numeric datatype.

MArius Milosav
Virtual Help Desk Demo
www.scorpiosoft.com/vhd/login.cfm

----- Original Message -----
From: Park, Simon <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, April 20, 2000 10:05 AM
Subject: li'l OT - SQL Server


> Is there a way to increment a value in SQL server with one database call -
> sort of like
> UPDATE mytable
> SET foofield = foofield++
> WHERE fooid = 2
> ?
>
>
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> Simon Park Computer Systems Management, Inc.
> [EMAIL PROTECTED] 205 South Whiting Street
> Ph: 703-823-4300 Suite 201
> fax: 703-823-4301 Alexandria, VA  22304
>              http://www.csmi.com
> --------------------------------------------------------------------------
----
> 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.

Reply via email to