How to call a stored procedure from a user defined function in SQL Server 2000
You can't call regular stored procs from functions - only other functions or some extended stored procedures. See here for the BOL article (from SQL 2005). Attempting to call a standard stored proc from a UDF will result in the following error...
Msg 557, Level 16, State 2, Line 1 Only functions and some extended stored procedures can be executed from within a function.