I have the following function:
CREATE FUNCTION dbo.test1 ()
RETURNS Int AS
The stored procedure test is as follows
WHERE (CustomerID = 'ALFKI')
and running the function produces the following error:
Server: Msg 557, Level 16, State 2, Procedure test, Line 5
Only functions and extended stored procedures can be executed from within a function.
Since test does not modify anything, why is this error message generated?