SQL 2000 User Defined Function with Dynamic SQL 
Author Message
 SQL 2000 User Defined Function with Dynamic SQL

I continue to get an error "Incorrect Syntax near the keyword Execute" on
the command of this Create Function command. I have tried many ways to get
around the error and have had no success. Can anyone enlighten me on the
My Thanks,

varchar(50) )
varchar(8000)  AS

'ID = ''' +


Mon, 12 Jan 2004 06:24:48 GMT
 SQL 2000 User Defined Function with Dynamic SQL

    You cannot use dynamic SQL from a FUNCTION. This is a known and
documented restriction in SQL2000. Please BOL for more details.

Umachandar Jayachandran
SQL Resources at http://www.umachandar.com/resources.htm
( Please reply only to newsgroup. )

Mon, 12 Jan 2004 06:44:36 GMT
 [ 2 post ] 

 Relevant Pages 

1. Dynamic SQL with variables in user-defined Functions

2. user-defined function return table with dynamic sql?

3. Advice on Views?: dynamic SQL, using cursors, inline user-defined functions

4. User-defined function and dynamic SQL.

5. Dynamic SQL in User Defined Function

6. Question on user defined function (SQL Server 2000)

7. Sql 2000 Calculated Fields and User Defined Functions

8. SQL 2000 User Defined Functions

9. SQL 2000 User Defined Functions

10. User Defined Functions - SQL 2000

11. Need help with SQL Server 2000 - user defined functions

12. User defined function in sql server 2000

Powered by phpBB® Forum Software