RE: Simple way to increment a value?

2005-07-01 Thread James Smith
queryUPDATE table set value = value + 1/query This should work. Well colour me stupid. When I tried this yesterday I was getting errors, that's why I posted the message. Having tried it again today it now seems to work. Guess I must have typo'd a table name or something. -- Jay

Re: Simple way to increment a value?

2005-07-01 Thread Ben Doom
James Smith wrote: Well colour me stupid. When I tried this yesterday I was getting errors, Grass-green red! --Ben ~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application

SQL: Simple way to increment a value?

2005-06-30 Thread James Smith
Is there an easy way to increment a value stored in a database table? Eg: instead of... querySELECT value FROM table/query set value = value + 1 queryUPDATE table SET value = #value#/query Doing something like queryUPDATE table set value = value + 1/query Or queryUPDATE table set value =

Re: SQL: Simple way to increment a value?

2005-06-30 Thread Ben Doom
James Smith wrote: Doing something like queryUPDATE table set value = value + 1/query In T-SQL, I think this actually works. Or something very similar, anyway. In other systems, you may need to do a subselect. --Ben ~|

SQL: Simple way to increment a value?

2005-06-30 Thread Jochem van Dieten
James Smith wrote: Is there an easy way to increment a value stored in a database table? Eg: instead of... querySELECT value FROM table/query set value = value + 1 queryUPDATE table SET value = #value#/query Doing something like queryUPDATE table set value = value + 1/query This