It cannot be done in T-SQL. You'll have to create a stand alone function.
>I'd like to write a small void function just like in C# which is called by the stored procedure.
>
>I do not want to create a stand alone function. So far the sites I looked only showed how to create a funciton.
>
>I've tried to run my script and put my function by starting function add.
>Instead of saying create function add which did not work.
>
>If you know how to write a function within a stored procedure, please let me know.
--sb--