Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

selectivly changing data

Posted on 2004-03-28
1
Medium Priority
?
265 Views
Last Modified: 2006-11-17
Hello,

       I have an sql database that has the has incorrect data in it,  I need to go thru and replace specific data values with correct information,  I've been doing this manually so far but its just taking forever.

Can someone help with a bit of sql code to do the following ?

here is the query that I've been using to get the data that I've been manually changing...
select CPU_UTIL from PERFMON where CPU_UTIL > '100'

this gives me all the data that is incorrect (CPU_UTIL is a percentage value but some systems are screwy and giving a 324653 value I need to change everything that is above 100   to 100.


Thanks for your help!
0
Comment
Question by:PaulGibson
1 Comment
 
LVL 1

Accepted Solution

by:
raje10410 earned 500 total points
ID: 10701935
Hi Paul,

Try this:

UPDATE PERFMON
SET CPU_UTIL = 100
WHERE CPU_UTIL > 100

Cheers,

Rajesh
0

Featured Post

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
This month, Experts Exchange sat down with resident SQL expert, Jim Horn, for an in-depth look into the makings of a successful career in SQL.
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.

971 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question