Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
chedderslam
Posting Yak Master
223 Posts |
Posted - 2008-06-10 : 16:32:50
|
| I understand how to call a stored procedure using ordinal arguments, such as:exec storedprocedure argument1 argument2How do you do it while naming the arguments, and passing non-ordinal?Thanks! |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2008-06-10 : 16:33:53
|
| Just use the parameter names. You can then pass them in any order.DECLARE @p1 int, @p2 varchar(10)SET @p1 = 1, @p2 = 'tkizer'EXEC sp1 @someparameter2 = @p2, @someparameter1 = @p1Tara KizerMicrosoft MVP for Windows Server System - SQL Serverhttp://weblogs.sqlteam.com/tarad/Subscribe to my blog |
 |
|
|
chedderslam
Posting Yak Master
223 Posts |
Posted - 2008-06-10 : 16:44:57
|
| That's what I was looking for. Thanks |
 |
|
|
|
|
|