Thanks to Ted Krueger (onpnt if you’re on twitter or use lessthandot.com), I now know how to display a BIGINT in RAISERROR. You just used %I64d. It’s documented in BOL as a sidebar note, but you still have to wade through the RAISERROR documentation.
So, our code would look like this:
DECLARE @i AS BIGINT; SET @i = 1; RAISERROR('%I64d is a very big number', 0, 43, @i);
Here’s the link to the BOL entry: RAISERROR.
Thanks, twitter, for making this all possible!