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 9052759
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T13:15:36+00:00 2026-06-16T13:15:36+00:00

I have a T-SQL stored procedure with the following parameters CREATE PROCEDURE [dbo].[SaveData] —

  • 0

I have a T-SQL stored procedure with the following parameters

CREATE PROCEDURE [dbo].[SaveData]
-- Add the parameters for the stored procedure here
    @UserID varchar(50),
    @ServiceID varchar(50),
    @param1 varchar(50),
    @param2 varchar(50),
    @endDate datetime
AS BEGIN
    . 
    .
    -- my code --

I want know if it is possible to pass a result of select as parameter:

    exec SaveDate (SELECT player.UserID,player.ServiceID, 'no','no',GETDATE()
           FROM player)

I tried something like this, but it does not work.

  • 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-16T13:15:37+00:00Added an answer on June 16, 2026 at 1:15 pm

    The SELECT query you wrote in your example would probably bring back multiple rows (your SELECT does not feature a WHERE clause or a TOP(n)). If your intention is to be able to have your procedure engage a “tabular” set of parameters, from SQL Server 2008, you are able to use table valued parameters.

    This involves creating a user defined table table and will almost undoubtedly mean adjusting the logic inside the stored procedure.

    Hope this helps 🙂

    See http://msdn.microsoft.com/en-us/library/bb510489(SQL.100).aspx
    for more information.

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

Sidebar

Related Questions

I have the following SQL Server stored procedure : BEGIN TRAN CREATE TABLE #TempTable
I have a stored procedure such as the following: CREATE PROCEDURE procTest -- Add
I have the following very basic stored procedure: CREATE PROCEDURE [dbo].[GetNumberToProcess] AS RETURN 999
I have the following PL/SQL stored procedure on an Oracle database: PROCEDURE MyProcedure (
I have the following stored procedure in an SQL Server 2005 database (meant simply
I have a T-SQL stored procedure with the signature CREATE PROCEDURE MyProc @recordCount INT
I have the following stored procedure defined: CREATE OR REPLACE PROCEDURE NOTIFY_INSERT ( FLAG
I have a stored procedure that looks like so. ALTER PROCEDURE dbo.addPackage( @PackageStatus VARCHAR(50)
I have a stored procedure in SQL Server CREATE PROCEDURE ParseXML (@InputXML xml) The
i have the following stored procedure in sql server and i am trying to

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.