Possible Duplicate:
TSQL How do you output PRINT in a user defined function?
This is driving me crazy.
I have a function I am trying to debug, but I can't insert into a table, execute a print statement, or even raise an error from it.
SQL returns the message
Invalid use of a side-effecting operator 'PRINT' within a function.
How can I Debug this, I just want to know the value of a variable while it is running?