|
|
|
|
||||||
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
Hi Folks,
with many system SP's, there are 'optional' input paramters you either can pass in or skip and the SP's response accordingly. I am wondering how does that work. can someone please show me an example . Thanks |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
You need to define the stored procedure by giving the optional parameters a
default value. For example, Create Procedure #FooTest (@Required int, @NotRequired int = 25) As Select @Required, @NotRequired; go Exec #FooTest 10 Exec #FooTest 20, 14 go Drop Procedure #FooTest; For more information, see the Create Procedure and Execute topics in BOL. Tom <loufuki@gmail.com> wrote in message news:81ef0b89-fce1-46a7-931e-6692ddd2cd4b@a3g2000prm.googlegroups.com... > Hi Folks, > with many system SP's, there are 'optional' input paramters you either > can pass in or skip and the SP's response accordingly. I am wondering > how does that work. can someone please show me an example . > > Thanks |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
thanks for a precise example.
this is exactly what I need K On Sep 12, 9:58am, "Tom Cooper" <tomcoo...@comcast.no.spam.please.net> wrote: > You need to define the stored procedure by giving the optional parametersa > default value. For example, > > Create Procedure #FooTest (@Required int, @NotRequired int = 25) > As > Select @Required, @NotRequired; > go > Exec #FooTest 10 > Exec #FooTest 20, 14 > go > Drop Procedure #FooTest; > > For more information, see the Create Procedure and Execute topics in BOL. > > Tom > > <louf...@gmail.com> wrote in message > > news:81ef0b89-fce1-46a7-931e-6692ddd2cd4b@a3g2000prm.googlegroups.com... > > > > > Hi Folks, > > with many system SP's, there are 'optional' input paramters you either > > can pass in or skip and the SP's response accordingly. I am wondering > > how does that work. can someone please show me an example . > > > Thanks- Hide quoted text - > > - Show quoted text - |
|
![]() |
| Outils de la discussion | |
|
|