Hello,
I've started working with a a very basic stored procedure in MSSQL and have a couple of questions.
I have a stored procedure that has 1 input parameter (a DepartmentID ) and the stored procedure
returns all rows from a table for that given department ID.
I can get columns and data returned from a stored procedure when I use the following syntax
EXEC CarlsTest 8 and the type of datasource is set to Query
I can also get the results I want if I have the datasource setup as a Stored Procedure and use a
parameter to store the DeptID.
Is there any advantage to using one method over another or does it just depend on personal
preference and/or the type of query being written?
For a more complex stored procedure is there a performance difference between running a
stored procedure with EXEC (and the datasource type as Query) versus running the stored
procedure with the datasource type as Stored Procedure.
Thank you,
Carl
Stored Procedure question
-
- Posts: 6266
- Joined: Tue Mar 20, 2018 5:34 am
Re: Stored Procedure question
Hello,
Please check the following discussion:
https://stackoverflow.com/questions/598 ... ts-on-mode
Thank you.
Please check the following discussion:
https://stackoverflow.com/questions/598 ... ts-on-mode
Thank you.
Re: Stored Procedure question
OK - Thank you Lech.
-
- Posts: 6266
- Joined: Tue Mar 20, 2018 5:34 am
Re: Stored Procedure question
Hello Carl,
You are welcome.
You are welcome.