June T-SQL Guru – Naomi brings us "How SQL Server Determines Type of the Constant"


It's time for our next June TechNet Guru winner!

 

Multi MCC award winner, two-time TechNet Guru Gold Medal winner, and Wiki Ninja Green Belt, Naomi N, is our T-SQL TechNet Guru for June! See the TechNet Guru Contributions for June 2013.

Naomi  N's avatar

ABOUT NAOMI: I am an IT professional with more than 15 years of experience in a variety of programming languages and technologies. I am a Microsoft Community Award Recipient and was Personality of the Year at the UniversalThread.com forum in 2008,2009,2010,2011.  

 

Here is Naomi's winning article:

How SQL Server Determines Type of the Constant

 

Here are all the June T-SQL winners (two were from Naomi):

Guru Award  Transact-SQL Technical Guru - June 2013  

Gold Award Winner

 

Naomi N How SQL Server Determines Type of the Constant Richard Mueller: "A good recommendation to explicitly CAST values, with an example of possible consequences if you don't."

Silver Award Winner

 

Naomi N SET ANSI_PADDING Setting and Its Importance Samuel Lester: "Outstanding contribution! I love the process of walking us through the debugging you performed. People who read this article gain an understanding of not only the SET ANSI_PADDING setting, but also how you arrived at discovering this as well as the technical resources available to ask in the MSDN forums. Very, very good!"
Ed Price: "Very in depth article with great code formatting!"
Richard Mueller: "This explains an issue I was not aware of. Well researched. Good to include a script to correct the situation."

Bronze Award Winner

 

Johnny Bell Jnr SQL Server Result Set In An HTML Email Richard Mueller: "Very instructive. I like this because similar techniques can be used for other applications."
Samuel Lester: "Great article and very handy for sure. I'm a big fan of code generation through T-SQL as you're doing with the @HTML parameter. I use similar tricks often to generate code for other programming languages. Very good!"
Ed Price: "The text does a great job setting up the code blocks!"

Transact SQL was our second largest category with 9 submissions (4 from Naomi)! Naomi holds onto her title for a second month. Thanks go out to all our contributors... Kalman, Naomi, Sathyanarrayanan, and Johnny Bell! You made it tough on the judges to select from an excellent group! Please go check them all out here.

 

Here's an excerpt from the article:

 

Problem Definition

There was an interesting question asked recently in Transact-SQL forum "Basic doubt in Round function"

The problem was stated as following:

SELECT ROUND(744, -3)

produced 1000 while

SELECT ROUND(744.0, -3)

gave an error "Arithmetic overflow error converting expression to data type numeric."

 

==================

 

Read the rest here:

How SQL Server Determines Type of the Constant

 

Thanks to Naomi N for your great contribution to the TechNet Guru contest! You can read about all the June winners here: TechNet Guru Award Winners - June 2013

 

Also, for the July Guru competition, see TechNet Guru Contributions for July 2013.

 

Any questions or comments for Naomi?

 

Are you a Wiki Ninja? http://technet.com/wiki

 

    - Ninja Ed

 

Comments (8)

  1. Naomi N says:

    Can you spot the typo in the beginning of the article?

  2. Naomi N says:

    Please fix the typo. I've been checking this blog the whole week and it is still here 🙁

  3. I just fixed two typos, but I don't know if I got it or not. And I've been out camping all week, so that's why it's still there.

    If it's the typo I fixed in the About Naomi section, then you should check your profile, because I got the text from there (and the typo is also in your profile text).

  4. Ah, I think you want me to update it from your Green belt to your new Blue belt. Is that the request?

    If so, I'll do it, but a blog post is a snapshot in time. It's not supposed to be kept up to date.

  5. Naomi N says:

    No, the typo is SSRS and I won T-SQL. I waited the whole week for you to fix it.

  6. Nice catch! I fixed it.

    Well I was out camping all week and unplugged. But I'm back! Thanks!

Skip to main content