Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8485275
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T20:35:49+00:00 2026-06-10T20:35:49+00:00

The issue I’m facing is that I have a stored procedure (lets call it

  • 0

The issue I’m facing is that I have a stored procedure (lets call it sp_one), which during it’s run calls another stored procedure (lets call it sp_two).

I’d only like the resultset from sp_one to be returned at the end, and not those from sp_two. I imagine there is a way to capture the results from sp_two that will prevent them from also being returned but haven’t been able to figure the syntax for this.

Any ideas?

Some pseudo code which captures the essence of what is going on (not my actual code):

CREATE PROCEDURE sp_two AS 
BEGIN
  update Users
  set is_valid = 0

  select * from Users
END


CREATE PROCEDURE sp_one
AS
BEGIN
  exec sp_two
  select * from Users
END

exec sp_one

The result of running exec sp_one is the resultset from sp_two, then the results from sp_one. (eg. the users table twice).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T20:35:51+00:00Added an answer on June 10, 2026 at 8:35 pm

    In sp_one, you can use

    CREATE TABLE #temporaryusers (Usertable fields here)
    INSERT INTO #temporaryusers 
    EXEC sp_two 
    
    DROP TABLE #temporaryusers 
    

    to swallow your results.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Issue is that I have wrote a method to duplicate selected row in a
Issue I want to implement TransparencyChecker Interface which would verify that from any exchange
Issue: I have a Mootools Request object which sends a GET request to a
Issue: Hello, I have an edit page which enables the client to update the
Issue context: Have a piece of code that's trying to add a new document
This issue is driving me mad. I have several tables defined, and CRUD stored
Issue I want to call a Lua script which require() s lyaml module, Lua
Issue adding on change event to a control. I currently have a page that
Issue I have a report in CR 2008 that I inherited from someone else
Issue is : I have one system Entity called 'Order' and another custom entity

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.