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)
 Divide and update

Author  Topic 

kensai
Posting Yak Master

172 Posts

Posted - 2002-08-08 : 05:59:50
I have a problem with a table. One of the columns of the table has numbers in it. The problem is with some error they updated to the double values. For example, '20' became '40'. So I need a way to update all rows of this table with the half values but I'm totally clueless about this. Can you help?

joldham
Wiseass Yak Posting Master

300 Posts

Posted - 2002-08-08 : 07:35:09
UPDATE tablename
SET Columnname = Columnname/2

Jeremy

Go to Top of Page

kensai
Posting Yak Master

172 Posts

Posted - 2002-08-08 : 09:02:14
duh! I feel stupid :)

Go to Top of Page
   

- Advertisement -