Contents tagged with dynamic sql
-
SQL Server Autonomous Transaction Within View
/* create a function that inserts to a table via xp_cmdshell */
CREATE FUNCTION dbo.fn_write_to_table()
RETURNS int
AS
BEGIN
DECLARE @sql varchar(MAX), @cmd varchar(4000)
SELECT @sql = ' … more