December 18, 2012 at 8:04 am
when i select modifiy proc i get the below: Is there an option that would force it to simply show as an alter proc and do away w/ all of this sp_executesql nonesence?
/****** Object: StoredProcedure [dbo].[aaaaatest] Script Date: 12/18/2012 9:47:50 AM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[aaaaatest]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'ALTER PROCEDURE [dbo].[aaaaatest]
AS
SELECT ''this is a test'''
END
December 18, 2012 at 8:24 am
you can turn off the sp_execute scripting, so it's a cleaner CREATE / ALTER PROCEDURE.... by changing a flag the flag "Include IF NOT EXISTS Clause" in the scripting options, and then youget the results you were looking for featuring ALTER;
Lowell
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply