Skip to content

Commit

Permalink
remove debug prints
Browse files Browse the repository at this point in the history
  • Loading branch information
yarenylmz committed Dec 18, 2024
1 parent d734908 commit 9a8aa15
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ BEGIN
IF @UnequalRowsExist > 0
BEGIN
EXEC [tSQLt_synapse].[Private_PrintTable] @ResultTableSchema, @ResultTable;
PRINT('Now drop')
SET @Cmd = 'DROP TABLE ' + @ResultTableWithSchema + ';'
EXEC [sp_executesql] @Cmd;
EXEC [tSQLt_synapse].[Fail] 'There exists unequal rows!';
Expand Down
12 changes: 1 addition & 11 deletions sql/tSQLt_synapse/StoredProcedures/Private_PrintTable.sql
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ BEGIN
END
ELSE
BEGIN
BEGIN TRY
PRINT ('In print');
IF OBJECT_ID('tempdb..#column_max_len') IS NOT NULL
DROP TABLE #column_max_len;
CREATE TABLE #column_max_len ([column_name] NVARCHAR(4000), [max_len] INT, [column_id] INT);
Expand All @@ -27,7 +25,7 @@ BEGIN
@MaxLengthString VARCHAR(100),
@ColumnID INT,
@MaxColumnID INT,
@Command NVARCHAR(2000);
@Command NVARCHAR(MAX);

SELECT
@ColumnID = MIN([clm].[column_id]),
Expand Down Expand Up @@ -104,18 +102,14 @@ BEGIN
)
WITH (DISTRIBUTION = ROUND_ROBIN, CLUSTERED INDEX ([sequence]));

PRINT ('After truncate');

SET @Command = N'
INSERT INTO #PrintTable
SELECT RowText, ROW_NUMBER() OVER(ORDER BY RowText) AS sequence
FROM (
SELECT CONCAT_WS('', '', ' + @ColumnCastList + ') AS RowText
FROM [' + @SchemaName + '].[' + @TableName + ']
) t;';
PRINT (@Command);
EXEC [sp_executesql] @Command;
PRINT ('Before loop');

-- Loop table and print each row
DECLARE @rowCounter INT = 1;
Expand All @@ -127,9 +121,5 @@ BEGIN
PRINT @rowStr;
SET @rowCounter = @rowCounter + 1;
END
END TRY
BEGIN CATCH
PRINT(ERROR_MESSAGE())
END CATCH
END
END;

0 comments on commit 9a8aa15

Please sign in to comment.