Solved

selectivly changing data

Posted on 2004-03-28
1
249 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 1

Accepted Solution

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

Try this:

UPDATE PERFMON
SET CPU_UTIL = 100
WHERE CPU_UTIL > 100

Cheers,

Rajesh
0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SQL Lag Function DateDiff 2 26
T-SQL: Number of Records is Greater Than One 7 51
Failover Cluster Primary Nodes Current Vote = 0 5 39
MS SQL TO JSON 14 18
Let's review the features of new SQL Server 2012 (Denali CTP3). It listed as below: PERCENT_RANK(): PERCENT_RANK() function will returns the percentage value of rank of the values among its group. PERCENT_RANK() function value always in be…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
Viewers will learn how the fundamental information of how to create a table.

710 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