Can i Use insert statement inside UDF

  • Hi to all

        Can i use insert statement inside the user defined function? if no can u give the reason 

  • This sounds like a homework question...

    Have you tried it?  What was the result and what would you like explained?

    -Eddie

    Eddie Wuerch
    MCM: SQL

  •  

    Msg 443, Level 16, State 15, Procedure sample, Line 9

    Invalid use of side-effecting or time-dependent operator in 'INSERT' within a function.

  • SQL Server will not support using DML statements inside UDF

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply