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
-- Show what has been found | |
SELECT * FROM @meta | |
ORDER BY [value_found], [schema_name], [table_name], [column_name], [update_script] | |
-- Merge update queries to use some of them in a customization project | |
SELECT DISTINCT STRING_AGG(CAST([update_script] AS nvarchar(max)), ';' + CHAR(13) + CHAR(10)) AS UpdateQueries | |
FROM @meta | |
-- Merge delete queries to use some of them in a customization project | |
SELECT DISTINCT STRING_AGG(CAST([delete_script] AS nvarchar(max)), ';' + CHAR(13) + CHAR(10)) AS DeleteQueries |
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 a Cursor to read #Results and generate rows from it | |
DECLARE C CURSOR FOR | |
-- Select statement to be driven by the cursor | |
SELECT [SchemaName], [TableName], [ColumnName] | |
FROM #Results | |
ORDER BY [SchemaName], [TableName], [ColumnName] | |
-- Open the Cursor (row pointer) | |
OPEN C |
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) |
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
IF OBJECT_ID('tempdb..#Results') IS NOT NULL | |
DROP TABLE #Results | |
SELECT * | |
INTO #Results | |
FROM | |
( | |
SELECT sche.name AS [SchemaName], | |
tabl.name AS [TableName], | |
cols.name AS [ColumnName] |
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
CREATE TABLE [dbo].[BAccount]( | |
[CompanyID] [int] NOT NULL, | |
[BAccountID] [int] IDENTITY(1,1) NOT NULL, | |
[AcctCD] [nvarchar](30) NOT NULL | |
... | |
CONSTRAINT [BAccount_PK] PRIMARY KEY CLUSTERED | |
( | |
[CompanyID] ASC, | |
[BAccountID] ASC | |
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY] |
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
CREATE TABLE [dbo].[WebHook]( | |
[CompanyID] [int] NOT NULL, | |
[WebHookID] [uniqueidentifier] NOT NULL, | |
[Name] [nvarchar](128) NOT NULL, | |
... | |
CONSTRAINT [WebHook_PK] PRIMARY KEY CLUSTERED | |
( | |
[CompanyID] ASC, | |
[WebHookID] ASC | |
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY] |
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
// Child Key | |
[PXDBDefault(typeof(BCBinding.bindingID))] | |
[PXDBInt(IsKey=true)] | |
[PXParent(typeof(Select<BCBinding, Where<BCBinding.bindingID, Equal<Current<BCBindingBigCommerce.bindingID>>>>))] | |
[PXUIField(DisplayName="Store", Visible=false)] | |
public int? BindingID { get; set; } | |
// Parent Key | |
[PXDBIdentity] | |
[PXUIField(DisplayName="Store ID", Visible=false)] |
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
[PXDBInt(IsKey = true)] | |
[PXUIField(DisplayName = "Line Nbr.", Visible = false)] | |
public int? LineNbr { get; set; } |
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
[PXDBLongIdentity(IsKey=true)] | |
[PXUIField(DisplayName="Record ID", Enabled=false, Visible=false)] | |
public long? RecordID { get; set; } |
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
[PXDBIdentity(IsKey=true)] | |
[PXUIField(Visible=false)] | |
public int? LogID { get; set; } |
OlderNewer