Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
Joe A
Starting Member
3 Posts |
Posted - 2012-01-04 : 12:13:13
|
| Hi all,I have a table with 712 rows.One column from row 545 onwards to row 712 is empty and needs to be filled with the value from another column in the same row. On top of this, this value needs to be multiplied by 0.0672.So, there is a column called 'Nitrogen' which (from row 545 until 712) needs to be filled with the value * 0.0672 from the column called 'Humus' in the same row.Can anybody provide me with an answer?Thanks very much,Joe A |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-01-04 : 12:17:50
|
| [code]UPDATE tablenameSET Nitrogen= Humus* 0.0672WHERE Nitrogen IS NULLOR Nitrogen =''[/code]------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
Joe A
Starting Member
3 Posts |
Posted - 2012-01-05 : 04:44:10
|
| Thanks! |
 |
|
|
Joe A
Starting Member
3 Posts |
Posted - 2012-01-05 : 04:54:41
|
Thanks you very much. That worked quite well!quote: Originally posted by visakh16
UPDATE tablenameSET Nitrogen= Humus* 0.0672WHERE Nitrogen IS NULLOR Nitrogen ='' ------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/
|
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-01-05 : 09:26:34
|
| you're welcome------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
|
|
|