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 |
|
CoffeeAddict
Yak Posting Veteran
94 Posts |
Posted - 2009-11-06 : 15:10:04
|
| Trying to figure out how to get this set:set @TotalPts = select SUM(someField) from orders where completedDate is not null and customerID = @customerID |
|
|
Lamprey
Master Smack Fu Yak Hacker
4614 Posts |
Posted - 2009-11-06 : 15:15:35
|
| [code]set @TotalPts = (select SUM(someField) from orders where completedDate is not null and customerID = @customerID)[/code]or[code]select @TotalPts = SUM(someField) from orders where completedDate is not null and customerID = @customerID[/code] |
 |
|
|
CoffeeAddict
Yak Posting Veteran
94 Posts |
Posted - 2009-11-06 : 15:17:09
|
| Thanks I knew I had to be close! |
 |
|
|
|
|
|