Category Archives: My Specific Situation

Home / My Specific Situation
48 Posts

 

(This is a C# LinqPad script)

Using setvar in T-SQL

Finds the SQL Command Variable definitions in a SQL script and parses their names and values.
Finds the SQL Command Variable references and parses their names.
Determines which references have no definitions.
Determines which definitions have no references.

The definition names and reference names are case insensitive.
A definition is in the form of :setvar name “value”
A reference is in the form of $(name)

 

Note: The [Order] field is not unique in the database. The [Namespace] field is for multi-tenancy support.

Using setvar in T-SQL