sql - How to Call a stored procedure from another stored procedure? -
I have an integrated stored procedure that takes several parameters - 2 of them are @FirstName, @LastName, I have There is also an updated stored procedure that takes several parameters - 2 of them are @fostname, @LastName.
What to do, insert this from within SP, when it is done, call Update SP and send it to @FirstName, @LastName.
I do not have the right syntax to do this; Can anyone tell me how to write this calling?
And if I will call update spam with different parameter names? Like @MyfieldName, @MyLastName @ will I write it like this: EXECUTE LandData_Update @ MyFirstName = @ First name, @ MyLastName = @ LastName
?
Do you think this is wrong? Start in the table values ('some value') as the construction process MyInsertSP @FirstName varchar (255), @LastName varchar (255), EXECUTE LandData_Update @FirstName, @LastName END
Do you get any errors or something?
Edit: It does not matter what the name of the variable is, but whatever you want to do, you can declare two new variables.
DECLARE @MyFirstName varchar (255) DECLARE @MyLastName varchar (255) SET @MyFirstName = @ First name SET @ MyLastName = @ListName
And then Use the new variable but again, the store does not care about the process where the variables are located.
Comments
Post a Comment