Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

selectivly changing data

Posted on 2004-03-28
1
Medium Priority
?
259 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 500 total points
ID: 10701935
Hi Paul,

Try this:

UPDATE PERFMON
SET CPU_UTIL = 100
WHERE CPU_UTIL > 100

Cheers,

Rajesh
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

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…
In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
Via a live example, show how to shrink a transaction log file down to a reasonable size.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

705 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