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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T06:08:24+00:00 2026-05-12T06:08:24+00:00

I have an insert stored procedure which takes many parameters – 2 of them

  • 0

I have an insert stored procedure which takes many parameters – 2 of them are @FirstName, @LastName.
I also have an update stored procedure which takes many parameters – 2 of them are @FirstName, @LastName.

What I want to do is, from inside the insert SP, when it’s done, call the update SP and send to it the @FirstName, @LastName.

I don’t know the right syntax to do that; I tried:

exec  LandData_Update @FirstName, @LastName

But I think it’s wrong.

Can someone tell me how to write this calling?

And if I will call the update sp with different param names? Such as @MyFirstName, @MyLastName? Would I write it like this: EXECUTE LandData_Update @MyFirstName=@FirstName, @MyLastName=@LastName?

  • 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-05-12T06:08:24+00:00Added an answer on May 12, 2026 at 6:08 am

    What makes you think it’s wrong?

    CREATE PROCEDURE MyInsertSP
        @FirstName varchar(255),
        @LastName  varchar(255)
    AS
    BEGIN
        INSERT INTO Table VALUES('Some Value')
    
        EXECUTE LandData_Update @FirstName, @LastName
    END
    

    Do you get an error or something?

    EDIT:
    It doesn’t matter what the name of the variables are, but to do what you want you can declare two new variables.

    DECLARE @MyFirstName varchar(255)
    DECLARE @MyLastName  varchar(255)
    
    SET @MyFirstName = @FirstName
    SET @MyLastName  = @LastName
    

    And then use the new variables. But again, the Store Procedure doesn’t care what the variables are called.

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

Sidebar

Related Questions

I have a stored procedure which is called inside a trigger on Insert/Update/Delete. The
I have a stored procedure which takes an XML parameter and inserts the data
Say I have a stored procedure consisting of several separate SELECT, INSERT, UPDATE and
I have this stored procedure which get data from excell and then update status:
I have stored procedure which runs perfectly. And when I insert it into query
I have a stored Procedure (Generate_Insert)which will output an Insert statement as output given
HI, I have an insert statement in a Stored Procedure that requires the value
I have a stored procedure with multiple insert/select statements. Let's say I'm using the
I have a stored procedure which when i call from MSSQL Server GUI.It returns
I think this hasn't been answered before. I have a stored procedure which enters

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.