TRUNCATE TABLE WITH (PARTITIONS()) breaks SSC

strvmarvstrvmarv Posts: 2
edited February 21, 2017 2:48PM in SQL Source Control
Every single time I check-in a stored procedure with the usage of TRUNCATE TABLE and WITH (PARTITIONS()) the commit occurs just fine, but SSC breaks permanently on a parsing error. The only way to resolve is to delete the sproc and re-link the DB. Example below, which works just fine in SSMS and Azure SQL when created and executed. This has been happening for some time. What am I supposed to do?

Error:

Errors occurred whilst parsing file (sproc path and filename here)
'' at line 10, column 7
CREATE PROCEDURE [dbo].[sproc_TruncateWithPartitions_Example]
	@row int
WITH EXECUTE AS OWNER 
AS
BEGIN
	-- SET NOCOUNT ON added to prevent extra result sets from
	-- interfering with SELECT statements.
	SET NOCOUNT ON;

	--DECLARE @row int = 17

    TRUNCATE TABLE [dbo].[ClientLogStaging] WITH (PARTITIONS (@row))

END

Comments

Sign In or Register to comment.