Link to home
Start Free TrialLog in
Avatar of SeTech
SeTechFlag for United States of America

asked on

Parameters and Stored Proc

My qestion is - I have a Stored Procedure with variables @Week and @LWeek and they (the variables) are declared (written) in the Stored Procdure in the following order:
@Week
@LWeek

And the name of the Stored Procedure is usp_Sales

So when I execute this Stored Procedure and input the variables as follows:
Exec usp_Sales '15', '14' means that @Week = 15 and @LWeek = 14., Correct?

Specifically I need to confirm that the order of the variable input (when executed) is based on the order of those variables in the Stored Proc. (my thoughts are that they must be). So since @Week if first in the script of the stored procedure means that the first variable input in the exec (15) is for that variable. And similarly since @LWeek is 2nd in the script in the exec that picks up the 14 which is 2nd in the exec.
ASKER CERTIFIED SOLUTION
Avatar of Chris Walsh
Chris Walsh
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of SeTech

ASKER

I must have hit the wrong zone cause I use SQL 2005, SQL 2008
Avatar of Pavel Celba
This parameter order is valid even when calling SQL Server SP from FoxPro via sql pass-through. :-)

I would say almost every FoxPro programmer can answer questions from SQL zone but not vice versa...