Last active
May 3, 2021 16:17
-
-
Save ste-bel/b2e13aab2e6a5fe3fd0169e2dfb2c70d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DECLARE @meta AS TABLE ( | |
[schema_name] varchar(128), | |
[table_name] varchar(128), | |
[column_name] varchar(128), | |
[company_id] int, | |
[row_count] int, | |
[value_found] varchar(128), | |
[search_value] varchar(128), | |
[update_script] nvarchar(1000), | |
[delete_script] nvarchar(1000) | |
) | |
DECLARE | |
@schema_name varchar(128), | |
@table_name varchar(128), | |
@column_name varchar(128), | |
@value_found varchar(128) | |
DECLARE @row_count int, @company_id int | |
DECLARE @SQL NVARCHAR(2000), @USQL NVARCHAR(1000), @DSQL NVARCHAR(1000) | |
-- Declare a search operator, typically either LIKE or = | |
DECLARE @SearchOperator varchar(20) | |
--SET @SearchOperator = ' LIKE ' | |
SET @SearchOperator = '=' | |
-- Declare the value we are searching for | |
DECLARE @SearchValue varchar(128) | |
--SET @SearchValue = 'SP%' | |
SET @SearchValue = '36' | |
-- Declare the replacement value we will use | |
DECLARE @NewValue varchar(128) | |
SET @NewValue = '4' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment