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 |
jylland
Starting Member
27 Posts |
Posted - 2012-12-10 : 11:44:29
|
is this here posibleHow do I SUM(Values)- Select SUM(value2) as test I have problem with "SUM(Values)- test"My codeSELECT SUM(value) AS Totalos....Case When SUM(Values) > 0 then 0 Else SUM(Values)- Select SUM(value2) as test from anothertable... |
|
nigelrivett
Master Smack Fu Yak Hacker
3385 Posts |
Posted - 2012-12-10 : 12:32:38
|
you need an endSELECT SUM(value) AS Totalos....Case When SUM(Values) > 0 then 0 Else SUM(Values) end - Select SUM(value2) as test from anothertable...==========================================Cursors are useful if you don't know sql.SSIS can be used in a similar way.Beer is not cold and it isn't fizzy. |
|
|
jylland
Starting Member
27 Posts |
Posted - 2012-12-11 : 05:24:21
|
quote: Originally posted by nigelrivett you need an endSELECT SUM(value) AS Totalos....Case When SUM(Values) > 0 then 0 Else SUM(Values) end - Select SUM(value2) as test from anothertable...==========================================Cursors are useful if you don't know sql.SSIS can be used in a similar way.Beer is not cold and it isn't fizzy.
Great job nigelrivett Thanks |
|
|
|
|
|