I have to insert a fake column at the result of a query, which is the return value of a table-value function. This column data type must be unique-identifier. The best way (I think...) is to use newid()
function. The problem is, I can't use newid()
inside this type of function:
Invalid use of side-effecting or time-dependent operator in 'newid()' within a function.