In SQL Server (2008 R2), instead of doing this:
DECLARE @testVar VARBINARY(64);
I would like to do this:
DECLARE @varSize INT;
SET @varSize = 64;
DECLARE @testVar VARBINARY(@varSize);
But I get this error:
Incorrect syntax near '@varSize'.
How can I do something like this or force SQL to evaluate @varSize?