?
Solved

SQL supress result set

Posted on 2011-02-28
4
Medium Priority
?
409 Views
Last Modified: 2012-05-11
I have a stored proc that calls other store procs which call other stored procs... When I call MY stored proc I want to supress the result set of the stored procs I'm calling... For example.. say my proc is called 'one'.. Stored proc 'one' calls stored proc 'two" and stored proc "two" calls stored proc"three"... I do not want to see the results of stored proc three.. I just want to run it becuase it does some things but it also has select statements in it and I dont want to see the select statements from "three".. My DBA wants me to do this in "one" NOT and I repeat.. He does NOT want me to put any code in "three".. Is there a way to supress the result of "three" from my stored proc "one"???
0
Comment
Question by:cheryl9063
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 34997206
no, that is not possible.

the only thing you can do is supress empty recordsets.


0
 
LVL 15

Expert Comment

by:derekkromm
ID: 34997213
Short answer: No

If "three" has select statements that return datasets, there is no way to suppress those

I'd suggest to your DBA that, in order to reduce duplicity of code, you simply add an optional bit parameter called "HideResults" that defaults to 0 and wrap around each select statement "if @HideResults = 0 ..."
0
 
LVL 10

Accepted Solution

by:
dwe761 earned 2000 total points
ID: 34997216
Create a stored proc Three_A which calls Three.

Three_A could have a parameter that says whether or not you want to suppress results.  If suppress then don't return them from Three_A, if not, then return results from Three_A.
0
 
LVL 1

Author Closing Comment

by:cheryl9063
ID: 35084931
That is actually quite clever.. Thanks!
0

Featured Post

Veeam Task Manager for Hyper-V

Task Manager for Hyper-V provides critical information that allows you to monitor Hyper-V performance by displaying real-time views of CPU and memory at the individual VM-level, so you can quickly identify which VMs are using host resources.

Question has a verified solution.

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

In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
This post looks at MongoDB and MySQL, and covers high-level MongoDB strengths, weaknesses, features, and uses from the perspective of an SQL user.
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

649 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