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)
 Execute

Author  Topic 

vivo
Starting Member

24 Posts

Posted - 2010-03-16 : 01:55:27
I want to execute external stored pro based on some condition.

Exec test
when ....

Is it possible ?

bklr
Master Smack Fu Yak Hacker

1693 Posts

Posted - 2010-03-16 : 02:00:32
u can use if condition then exec test else something else
but u cannot check the condition
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2010-03-16 : 03:06:22
You can move the resultset to a temporary table and use that table for comparison

Madhivanan

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

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2010-03-16 : 03:57:34
or second method here
http://beyondrelational.com/blogs/madhivanan/archive/2007/11/24/select-columns-from-exec-procedure-name-is-this-possible.aspx

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -