forked from tSQLt-org/tSQLt
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtSQLt._Footer.sql
More file actions
24 lines (23 loc) · 1.01 KB
/
tSQLt._Footer.sql
File metadata and controls
24 lines (23 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
---Build+
GO
SET NOCOUNT ON;
DECLARE @ver NVARCHAR(MAX);
DECLARE @match INT;
SELECT @ver = '| tSQLt Version: ' + I.Version,
@match = CASE WHEN I.Version = I.ClrVersion THEN 1 ELSE 0 END
FROM tSQLt.Info() AS I;
SET @ver = @ver+SPACE(42-LEN(@ver))+'|';
RAISERROR('',0,1)WITH NOWAIT;
RAISERROR('+-----------------------------------------+',0,1)WITH NOWAIT;
RAISERROR('| |',0,1)WITH NOWAIT;
RAISERROR('| Thank you for using tSQLt. |',0,1)WITH NOWAIT;
RAISERROR('| |',0,1)WITH NOWAIT;
RAISERROR(@ver,0,1)WITH NOWAIT;
IF(@match = 0)
BEGIN
RAISERROR('| |',0,1)WITH NOWAIT;
RAISERROR('| ERROR: mismatching CLR Version. |',0,1)WITH NOWAIT;
RAISERROR('| Please download a new version of tSQLt. |',0,1)WITH NOWAIT;
END
RAISERROR('| |',0,1)WITH NOWAIT;
RAISERROR('+-----------------------------------------+',0,1)WITH NOWAIT;