Solved

SUPPRESS RESULT SET FROM A STORED PROCEDURE

Posted on 2008-10-16
1
1,766 Views
Last Modified: 2008-12-12
Is it possible to suppress a resultset from a stored procedure?

See Code Snippet for example..

I'd like to call MONTHLYREPCOMMISSIONS  and return only the results from the third stored procedure "SalesTracingNdcMainReportByRepSP".

Thanks!
ALTER              PROCEDURE dbo.MONTHLYREPCOMMISSIONS 

@Year int,

@Period int,

@Rep varchar(10)

AS

DECLARE @SQL NVARCHAR(4000)

DECLARE @ParameterList nvarchar(200)

DECLARE @ParameterList2 nvarchar(200)
 

EXEC OutOfTerritorySP @Year,@Period,'0'

EXEC FSDBMR.dbo.SalesTracingCommissionInvoiceDetailReportSP @Year,@Period

EXEC SalesTracingNdcMainReportByRepSP @Year,@Period,0
 

GO

SET QUOTED_IDENTIFIER OFF 

GO

SET ANSI_NULLS ON 

GO

Open in new window

0
Comment
Question by:DEADSETONFINISHING
1 Comment
 
LVL 142

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 250 total points
ID: 22733208
>Is it possible to suppress a resultset from a stored procedure?
no.
only the "x rows affected" can be supressed with the SET NOCOUNT ON

anything else needs to be programmed into the "other" procedures, a parameter to say "don't return anything, just do your work.
0

Featured Post

Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Parse field in SQL View 15 97
TSQL Where clause for Date with CASE - what is wrong? 11 73
grouping logic 6 47
email about the whoisactive result 7 23
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.
Viewers will learn how the fundamental information of how to create a table.

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now