Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Incrementing TSQL Variables

Author  Topic 

jesus4u
Posting Yak Master

204 Posts

Posted - 2002-08-06 : 14:01:51
Does this increment @sendMessages by one?

SET @sendMessages = @sendMessages + 1

UPDATE Chatters SET lastAction = getdate(), sendMessages = @sendMessages WHERE id = @Uid AND Chatid = @ChatRoomID


monkeybite
Posting Yak Master

152 Posts

Posted - 2002-08-06 : 14:08:33
Only if these things happen:

1. @sendMessages is some sort of numeric data type
2. @sendMessages is given a value

You need to seed @sendMessages with a value before you perform any calcs on it.

-- monkey


Go to Top of Page

jesus4u
Posting Yak Master

204 Posts

Posted - 2002-08-06 : 14:09:15
thanks..look at my newer thread

Go to Top of Page
   

- Advertisement -