By: Svetlana Golovko | Updated: 2017-07-07 | Comments | Related: More > Professional Development Skills Development
Problem
There are a lot of different ways to learn SQL Server. You can take official Microsoft courses or free courses from Microsoft Virtual Academy, buy books, read documentation, blogs, tips on MSSQLTips, etc. What else could be useful? How else can you learn from the user community?
Solution
In this tip we will provide two non-traditional ways of learning SQL Server. These methods are not for exam preparation or for learning SQL Server from scratch, but more for learning small things that you may be not aware of or forgot about.
Learn by Using Microsoft Connect Site
Microsoft Connect is an online resource for users to submit bugs and suggestions/feedback for Microsoft products. These bugs and suggestions are reviewed by the Microsoft teams and some of them will be considered for future releases.
Microsoft's SQL Server Connect web site could be used to submit bugs and feedback for SQL Server, but you can also use it in a non-traditional way to learn SQL Server.
How can you use these to learn?
Start from the Feedback page here:
Click on the "Advance search" link and then refine the search results by selecting "Resolved" and click the "Filter" button:
You will get a list of the resolved bugs and suggestions.
In the search results, look for the resolved items marked with "as By Design" note. The description for this type of item is: "The product team believes this item works according to its intended design. A more detailed explanation for the resolution of this particular item may have been provided in the comments section."
Click on a suggestion/bug title to see the details.
Browse both - the Bugs and the Suggestions tabs.
Note: You may need to browse from page to page as "By Design" results are not searchable and you can't sort the results. Also, note that you could potentially see more results when you are signed in.
Feedback Examples
Here are some interesting examples of feedback and responses where Microsoft's team explains why these items are not bugs.
Cast Money as Float then Int
The feedback is:
PRINT CAST(CAST(CAST(0.57 as money) AS FLOAT)*100 AS INT)
"I would expect the result to be 0.57 but the result returned is 56. Also returns unexpected values for 0.29 and 0.58."
Here is a comment from Microsoft's team:
"The behavior you are seeing is by design. Float datatype uses approximate representation and in addition to that we truncate float values when converting to integer data types. See the link below: http://msdn.microsoft.com/en-us/library/ms173773.aspx.
Use decimal data type if you want precision & even with those types you need to be aware of the precision/scale changes based on the arithmetic operation."
Try-convert and Empty Strings
The feedback is:
"TRY_CONVERT doesn't return expected results when the second parameter is an empty string (or a string with just white space)."
Here is Microsoft's team response:
"The behavior you are seeing is by design. TRY_CONVERT basically is same as CONVERT for given input that can be converted successfully. We have no intention of changing. So for valid input, below functions should give same answer:"
SELECT TRY_CONVERT(date, ''), try_cast('' as date), convert(date, ''), cast('' as date); SELECT TRY_CONVERT(int, ''), try_cast('' as int), convert(int, ''), cast('' as int);
Set Identity Insert on Table Variables
The feedback is:
"When using a table variable, the SET IDENTITY INSERT command errors out with
Msg 102, Level 15, State 1, Line 9 Incorrect syntax near '@tmp'.
Test harness: "
PRINT CAST(CAST(CAST(0.57 as money) AS FLOAT)*100 AS INT) DECLARE @tmp TABLE (SlNo INT IDENTITY,Name VARCHAR(200)) INSERT INTO @tmp(Name) Values('SCREW') INSERT INTO @tmp(Name) Values('HAMMER') INSERT INTO @tmp(Name) Values('SAW') DELETE FROM @tmp WHERE SlNo = 2 SET IDENTITY_INSERT @tmp ON INSERT INTO @tmp(SlNO,Name) Values(2,'SHOVEL') SELECT * FROM @tmp"
Here is the Microsoft's answer:
"It's not just IDENTITY INSERT. Table variables cannot be altered. Added that information to the table (Transact-SQL) topic. It will appear in a couple weeks. Thank you for submitting this item."
As a result of this last feedback the documentation has been updated. This feedback has also other comments from the user community.
Learn by Checking Questions from the User Communities
There are many blogs and web sites where users send their questions about SQL Server. Read questions and if you don't know the answer - do some research and learn something new too.
Here are some of the sites with user questions that you can check:
- SQL Server Question and Answers on MSSQLTips.com
- SQL Server Central Forum
- MSDN SQL Server Forums
- DBA StackExchange
- SQL Team
Next Steps
- Use MSSQLTips tutorials for learning SQL Server.
- Read tips about professional development here.
- Find out what you need to become a certified SQL Server professional here.
- Answer users questions about SQL Server on forums if you know the subject.
About the author
This author pledges the content of this article is based on professional experience and not AI generated.
View all my tips
Article Last Updated: 2017-07-07