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
 SSIS and Import/Export (2005)
 User Define Function

Author  Topic 

Roiter
Starting Member

1 Post

Posted - 2007-06-27 : 04:51:26

Hi

I have a question about user define function in sql.
How can I use Exec in UDF?
What I mean is that I made a string in a UDF, And I need to
execute the string in function. but I think it's illegal.
so tell me how can I use it?

P.S : forget about useing stored procedure instead of function.

thanx.

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2007-06-27 : 05:25:54
Post the full code of Function

Madhivanan

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

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2007-06-27 : 05:55:39
you can't.
executing dynamic sql in functions is illegal.

_______________________________________________
Causing trouble since 1980
blog: http://weblogs.sqlteam.com/mladenp
Go to Top of Page
   

- Advertisement -