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.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Procedure choices

Author  Topic 

ranalk
Starting Member

49 Posts

Posted - 2010-03-01 : 04:17:36
Hi,

I would like to run different parts with the same procedure by input of 1\2.

e.g when the input is 1, then just the "first" part of the procedure will run , and when the input is 2 I would like to run the whole procedure.

Please refer the first part as XXX and the second as YYY.

Thanks in advance,
Ran

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2010-03-01 : 04:21:40
If @input=1
Begin
...................
End

If @input=2
Begin
...................
End

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

ranalk
Starting Member

49 Posts

Posted - 2010-03-01 : 04:36:40
how should I declare these parameters?
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2010-03-01 : 04:42:41
quote:
Originally posted by ranalk

how should I declare these parameters?


Post your current procedure code

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -