Hi I have the following table:
tblMeasurement
StationID, PollutantCode, Value
e.g.
01220 013 23.4
01122 011 7.8
...
I want to make a simple transformation-update to the data :
IF the code is 013 then multiply the value by 0.2 and replace the existing
value, etc.
Is this part of UPDATE? I can't seem to find a simple example anywhere .
TIA
-steveTry,
update tblMeasurement
set Value = Value * 0.02
where PollutantCode = '013'
go
AMB
"steve" wrote:
> Hi I have the following table:
> tblMeasurement
> StationID, PollutantCode, Value
> e.g.
> 01220 013 23.4
> 01122 011 7.8
> ....
> I want to make a simple transformation-update to the data :
> IF the code is 013 then multiply the value by 0.2 and replace the existing
> value, etc.
> Is this part of UPDATE? I can't seem to find a simple example anywhere .
> TIA
> -steve
>
>
Monday, February 20, 2012
Newbie: Simple data transformation
Labels:
database,
following,
microsoft,
mysql,
newbie,
oracle,
pollutantcode,
server,
sql,
tabletblmeasurementstationid,
transformation,
valuee
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment