Solved

selectivly changing data

Posted on 2004-03-28
1
214 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 125 total points
ID: 10701935
Hi Paul,

Try this:

UPDATE PERFMON
SET CPU_UTIL = 100
WHERE CPU_UTIL > 100

Cheers,

Rajesh
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Suggested Solutions

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…
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.
Viewers will learn how the fundamental information of how to create a table.

758 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now