Print is not allowed in UDF

I want to put some trace in the a UDF, so I put print in the function. IT gave error. Can anyone please explain why this happen. But this work with SPs.

Cheers

Shimit




Answer this question

Print is not allowed in UDF

  • AlisonW

    Hi,

    this is just simply one of the limitations UDFs take, like not being able to execute something via EXEC or executing a SP in common, or using GETDATE() in functions...

    HTH, Jens Suessmeyer.

    ---
    http://www.sqlserver2005.de
    ---

  • Print is not allowed in UDF