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 |
|
pamyral_279
Posting Yak Master
143 Posts |
Posted - 2012-02-06 : 21:48:28
|
| Hi all,I have table with Field (ID,Mark1,Mark2 with int field, StoreDate with Date)ID Mark1 Mark2 StoreDateNow, i want to create procedure with parameter Mark in order to sum Mark1 and Mark2 field. I do :Create Procedure SumMark@Markasselect Sum(@Mark) from table1mean that when i use : Sum(Mark1) and Sum(Mark2)But i found error : Must declare the scalar variable "@Mark".Any one help correct it !Thank you very much. |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
pamyral_279
Posting Yak Master
143 Posts |
Posted - 2012-02-07 : 01:10:51
|
| Good idea ! have you other solutions in case i have many field mark1,mark2,mark3 ...Thank you very much ! |
 |
|
|
|
|
|