Skip to content

Instantly share code, notes, and snippets.

View DaveBoltman's full-sized avatar

DaveBoltman

  • Krugersdorp, South Africa
View GitHub Profile
@DaveBoltman
DaveBoltman / tSQLt.PrepareTableForFaking.sql
Last active July 15, 2024 22:58
Prepare table for faking in tSQLt , even when the table has schemabound dependencies
SET QUOTED_IDENTIFIER ON
SET ANSI_NULLS ON
GO
ALTER PROCEDURE tSQLt.PrepareTableForFaking
@TableName NVARCHAR(MAX),
@SchemaName NVARCHAR(MAX)
AS
-- This is not part of the standard tSQLt library
-- See https://harouny.com/2013/04/19/tsqlt-taketable-indexed-view/ (original source)