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
=Parameters!SchemaName.Value & "." & Parameters!TableName.Value |
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
=(Max(Fields!ID.Value, "ReportSchema") < 2) |
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
=LOOKUP("Column001", Fields!ColumnID.Value, Fields!ColumnName.Value, "ReportSchema") |
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 OR ALTER PROC [dbo].[GetGenericReportMetadata] | |
( | |
@Schema VARCHAR(50) | |
, @Table VARCHAR(50) | |
) | |
AS | |
SELECT ROW_NUMBER() OVER (ORDER BY c.column_id) [ID] | |
, 'Column' + RIGHT('000' + CAST(ROW_NUMBER() OVER (ORDER BY c.column_id) AS VARCHAR(10)), 3) [ColumnID] |
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 OR ALTER PROCEDURE [dbo].[GetGenericReportData] | |
( | |
@Schema VARCHAR(50) | |
, @Table VARCHAR(50) | |
) | |
AS | |
BEGIN |
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
ALTER DATABASE [ChangeTracking] SET change_tracking = ON (change_retention = 14 days) |
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
SELECT * | |
FROM CHANGETABLE(CHANGES dbo.Emp, 478) |
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
DELETE dbo.Emp | |
WHERE FirstName = 'Joey' | |
AND LastName = 'Tribbiani' |
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
SELECT * | |
, CHANGE_TRACKING_IS_COLUMN_IN_MASK (COLUMNPROPERTY(OBJECT_ID('dbo.Emp'), 'LastName', 'ColumnId'), ct.SYS_CHANGE_COLUMNS) AS MiddleName_Changed | |
FROM CHANGETABLE(CHANGES dbo.Emp, @ver) AS ct |
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
UPDATE dbo.Emp | |
SET MiddleName = 'Muriel' | |
WHERE FirstName = 'Chandler' AND LastName = 'Bing' | |
UPDATE dbo.Emp | |
SET LastName = 'Bing' | |
WHERE FirstName = 'Monica' AND LastName = 'Geller' |
NewerOlder