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 |
|
itskhan
Starting Member
8 Posts |
Posted - 2011-04-06 : 04:50:09
|
| Hi I have a procedure whis is returing fine I want to select one value into a variable from it after executing it but did'nt work.I am doing this:USE ExcelGODECLARE @tcount bigintEXEC [dbo].[mSP_GETPATHOLOGISTWORKLIST] @SECTION = 1, @StartRowIndex = 1, @MaximumRows = 10, @COUNTREQUIRED = 'Y', @TotalCount = @tcount OUTPUTSELECT @tcount as N'@TotalCount'Regards,Raza |
|
|
McDebil
Starting Member
23 Posts |
Posted - 2011-04-06 : 05:04:42
|
| DECLARE @TotalCount bigintEXEC [dbo].[mSP_GETPATHOLOGISTWORKLIST]@SECTION = 1,@StartRowIndex = 1,@MaximumRows = 10,@COUNTREQUIRED = 'Y',@TotalCount OUTPUTSELECT @TotalCount as N'@TotalCount'McDebil |
 |
|
|
itskhan
Starting Member
8 Posts |
Posted - 2011-04-06 : 05:58:38
|
| The soloution Provided is not working |
 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2011-04-06 : 06:05:55
|
did you defined the @TotalCount as OUTPUT parameter in your stored procedure ? KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
itskhan
Starting Member
8 Posts |
Posted - 2011-04-06 : 06:08:57
|
| Yes @TotalCount BIGINT OUTPUTis defined in the procedure |
 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2011-04-06 : 06:11:31
|
so what is not working ? or maybe you have a bug inside your stored procedure ? KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
McDebil
Starting Member
23 Posts |
Posted - 2011-04-06 : 06:12:52
|
| Script the procedure for execute in the SSMS and run it.You can SELECT the declared output parameter after the execute command.McDebil |
 |
|
|
|
|
|
|
|