RAISERROR and BIGINT

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!

Add Your Comments

Disclaimer
Your email is never published nor shared.
Required
Required
Tips

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <ol> <ul> <li> <strong> <p>

Ready?

This site is protected with Urban Giraffe's plugin 'HTML Purified' and Edward Z. Yang's Powered by HTML Purifier. 401 items have been purified.