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 2000 Forums
 SQL Server Development (2000)
 User Defined Function

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-08-26 : 11:18:54
Abhijeet writes "I have 2 questions .

Q1. Can we create dynamic SQL inside a function (yes/no) , If yes then How ? otherwise give me the alternate solution ...

Q2. How to pass array in a function"

jasper_smith
SQL Server MVP & SQLTeam MVY

846 Posts

Posted - 2002-08-26 : 11:59:13
1) No. Look at CREATE FUNCTION in BOL - it states what you are and are not allowed to do in a function.
2) You can pass in a delimited list and use another function such as fn_Split [url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsqlmag01/html/TreatYourself.asp[/url] to split it.

HTH
Jasper Smith
Go to Top of Page
   

- Advertisement -