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 |
|
OBINNA_EKE
Posting Yak Master
234 Posts |
Posted - 2006-04-27 : 07:46:18
|
| SET @NewRevenueValue =(sELECT (ROUND(sum(UnitPrice) * sum(qty),-3)) AS RevenueValue FROM OrderIDSummary WHERE OrderID = @OrderID)This won't work, it generates Server: Msg 8624, Level 16, State 16, Line 14Internal SQL Server error.But copying the select Part works ie sELECT (ROUND(sum(UnitPrice) * sum(qty),-3)) AS RevenueValue FROM OrderIDSummary WHERE OrderID = @OrderIDWHY |
|
|
chiragkhabaria
Master Smack Fu Yak Hacker
1907 Posts |
Posted - 2006-04-27 : 07:55:56
|
| Try this .. Select @NewRevenueValue =(sELECT (ROUND(sum(UnitPrice) * sum(qty),-3)) AS RevenueValue FROM OrderIDSummary WHERE OrderID = @OrderID)If Debugging is the process of removing Bugs then i Guess programming should be process of Adding them. |
 |
|
|
OBINNA_EKE
Posting Yak Master
234 Posts |
Posted - 2006-04-27 : 08:01:54
|
| The same error message, I want to Initialise the variable @NewRevenueValue |
 |
|
|
chiragkhabaria
Master Smack Fu Yak Hacker
1907 Posts |
Posted - 2006-04-27 : 08:07:05
|
| opps sorry Try this .. Select @NewRevenueValue = (ROUND(sum(UnitPrice) * sum(qty),-3)) FROM OrderIDSummary WHERE OrderID = @OrderID??If Debugging is the process of removing Bugs then i Guess programming should be process of Adding them. |
 |
|
|
OBINNA_EKE
Posting Yak Master
234 Posts |
Posted - 2006-04-27 : 08:38:00
|
| Thanks it worked, why didn't mine work ? |
 |
|
|
chiragkhabaria
Master Smack Fu Yak Hacker
1907 Posts |
Posted - 2006-04-27 : 08:58:27
|
| No Idea, look at this article is its helps.. http://support.microsoft.com/kb/830466If Debugging is the process of removing Bugs then i Guess programming should be process of Adding them. |
 |
|
|
|
|
|