[code language="sql"] /* AUTHOR : Brahmanand Shukla DATE : 23-Jul-2018 DESCRIPTION : Generic function to check if a particular value is within the tolerance limit of the Benchmark value EXAMPLE : -- Sample with Tolerance Basis as 'PERCENTAGE' SELECT [dbo].[ufn_IsWithinToleranceRange] ( 100 -- @BenchmarkValue , 120 -- @ValueToCompare , 'PERCENTAGE' -- @ToleranceBasis , 20 -- … Continue reading Generic scalar function to check the tolerance – SQL Server
Tag: T-SQL
Generic trigger for audit log – SQL Server
[code language="sql"] /* AUTHOR : BRAHMANAND SHUKLA DATE : 18-MAY-2018 PURPOSE : Generic trigger for maintaining the Audit Log STEPS FOR IMPLEMENTATION: STEP 1: Create the following tables on the same database or on seperate Audit Log Database. I have used seperate database for Audit Log with name "Audit_Log". CREATE TABLE [AUDIT_LOG_TABLE_PRIMARY_KEY] ( [ID] NUMERIC … Continue reading Generic trigger for audit log – SQL Server