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 |
|
kensai
Posting Yak Master
172 Posts |
Posted - 2002-02-26 : 17:52:40
|
| I have a sp which returns some records as result. How can I find how many records it will return? |
|
|
Lou
Yak Posting Veteran
59 Posts |
Posted - 2002-02-26 : 17:57:15
|
| Within the Sp:select @row=count(*)from(...) as areturn @rowExecute the sp:exec @row=mySpI hope I answered your question. |
 |
|
|
byrmol
Shed Building SQL Farmer
1591 Posts |
Posted - 2002-02-26 : 18:01:31
|
Kensai,Only gives the count of the last action in the Proc...exec upSomeProcSelect @@RowCount DavidMTomorrow is the same day as Today was the day before. |
 |
|
|
kensai
Posting Yak Master
172 Posts |
Posted - 2002-02-28 : 14:21:25
|
| byrmol @@rowcount seems the way but I couldn't find the way to implement it to my code. my sp has some dynamic sql in it. like this:set @sql='select bla bla..'exec dbo.sp_executesql @sqlI returns the recordset like this. And I use GetRows in the ASP page to use it. I know I can use Command in ASP page and Return() in sp but I want to use GetRows. Do you have any idea to add @@rowcount to this sp? |
 |
|
|
byrmol
Shed Building SQL Farmer
1591 Posts |
Posted - 2002-02-28 : 17:06:50
|
| kensai,Why not use a ADO Command object?Get the RETURN value.Get the recordset from it, execute GetRowsDavidMTomorrow is the same day as Today was the day before. |
 |
|
|
|
|
|