TRUNCATE TABLE WITH (PARTITIONS()) breaks SSC
strvmarv
Posts: 2
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
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
This feature is still not supported in SQL Source Control.
Please follow this thread for updates on this.
Thank you,
Product Support Engineer
Redgate Software Ltd
Please see our Help Center for detailed guides on how to use our tools
This now works in the latest version of SQL Source Control available in the Frequent Releases channel, version 5.5.4
Product Support Engineer
Redgate Software Ltd
Please see our Help Center for detailed guides on how to use our tools