How can we help you today? How can we help you today?

TRUNCATE TABLE WITH (PARTITIONS()) breaks SSC

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
strvmarv
0

Comments

2 comments

  • Sergio R
    Hi,

    This feature is still not supported in SQL Source Control.
    Please follow this thread for updates on this.

    Thank you,
    Sergio R
    0
  • Sergio R

    This now works in the latest version of SQL Source Control available in the Frequent Releases channel, version 5.5.4

    Sergio R
    0

Add comment

Please sign in to leave a comment.