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 |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2003-04-21 : 10:29:20
|
| Gene writes "Hi,Perhaps "batches" will solve this, but I have no experience with them and couldn't figger 'em out when I tried in Enterprise Manager (and I've combed books online and Google for this, too!)I want to do something like you see below in a stored procedure, but only return the data from the second SELECT statement. However, when I create a stored procedure that does this, it returns two result sets, the first one containing the count (which is only used internally in the stored proc) and the second one containing the data. This screws up my ASP page, as it doesn't see the second result set. Any ideas? Thanks in advance!SELECT @count=count(memID) FROM p_members WHERE status=1UPDATE p_batches SET qty=@count where batchid=@batchidSELECT memID, firstname, lastname FROM p_members WHERE status=1SQL Server 2000, Windows 2000, latest service packs, etc. (on Orcsweb.com)" |
|
|
jasper_smith
SQL Server MVP & SQLTeam MVY
846 Posts |
Posted - 2003-04-21 : 10:34:12
|
| Put SET NOCOUNT ON at the top of your procedureHTHJasper Smith0x73656c6563742027546f6f206d7563682074696d65206f6e20796f75722068616e6473203f27 |
 |
|
|
|
|
|
|
|