<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>SQL Server Journey with SQL Authority</title>
	<atom:link href="http://blog.sqlauthority.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.sqlauthority.com</link>
	<description>Personal Notes of Pinal Dave</description>
	<lastBuildDate>Fri, 01 Jun 2012 18:56:28 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='blog.sqlauthority.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://0.gravatar.com/blavatar/08e35387c05b61340e885b1763a69d9f?s=96&#038;d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>SQL Server Journey with SQL Authority</title>
		<link>http://blog.sqlauthority.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://blog.sqlauthority.com/osd.xml" title="SQL Server Journey with SQL Authority" />
	<atom:link rel='hub' href='http://blog.sqlauthority.com/?pushpress=hub'/>
		<item>
		<title>Developer Training &#8211; A Conclusive Summary- Part 5</title>
		<link>http://blog.sqlauthority.com/2012/06/01/developer-training-a-conclusive-summary-part-5/</link>
		<comments>http://blog.sqlauthority.com/2012/06/01/developer-training-a-conclusive-summary-part-5/#comments</comments>
		<pubDate>Fri, 01 Jun 2012 01:30:34 +0000</pubDate>
		<dc:creator>pinaldave</dc:creator>
				<category><![CDATA[Developer Training]]></category>
		<category><![CDATA[PostADay]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Authority]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[T SQL]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=18965</guid>
		<description><![CDATA[Developer Training - Importance and Significance - Part 1 Developer Training – Employee Morals and Ethics – Part 2 Developer Training – Difficult Questions and Alternative Perspective - Part 3 Developer Training – Various Options for Developer Training – Part 4 Developer Training &#8211; A Conclusive Summary- Part 5 We have now reached the end of our series [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&#038;blog=668536&#038;post=18965&#038;subd=sqlauthority&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong><a href="http://blog.sqlauthority.com/2012/05/28/developer-training-importance-and-significance-part-1/" target="_blank">Developer Training - Importance and Significance - Part 1</a></strong><br />
<strong><a href="http://blog.sqlauthority.com/2012/05/29/developer-training-employee-morals-and-ethics-part-2/" target="_blank">Developer Training – Employee Morals and Ethics – Part 2</a></strong><br />
<strong><a href="http://blog.sqlauthority.com/2012/05/30/developer-training-difficult-questions-and-alternative-perspective-part-3/" target="_blank">Developer Training – Difficult Questions and Alternative Perspective - Part 3</a></strong><br />
<strong><a href="http://blog.sqlauthority.com/2012/05/31/developer-training-various-options-for-maximum-benefit-part-4/" target="_blank">Developer Training – Various Options for Developer Training – Part 4</a></strong><br />
<strong><a href="http://blog.sqlauthority.com/2012/06/01/developer-training-a-conclusive-summary-part-5/" target="_blank">Developer Training &#8211; A Conclusive Summary- Part 5</a></strong></p>
<hr />
<p style="text-align:justify;">We have now reached the end of our series about developer training.  I hope you have come away thinking that training is the best way to advance in your company and that you are looking for training opportunities right now.  If you’re still not convinced here are a few things to keep in mind:</p>
<ul style="text-align:justify;">
<li> Training benefits the employer and the employee.</li>
<li>A well trained employee is a happy employee, and a happy employee is more efficient and productive.</li>
<li>Training an employee might be expensive, but it is less expensive than hiring a new person.</li>
</ul>
<p style="text-align:justify;">Whether you are looking at him from the employee’s or the company’s point of view, there are always advantages to training.</p>
<h3 style="text-align:justify;">A Broader View</h3>
<p style="text-align:justify;">This series is definitely written for Developer Training but it is not limited to developers only. There are IT Pro, System Admins, DBAs as well many other technology professionals; this article series is for all professionals in the world. The concepts and take away will remain common across all the platform and regardless of technology affiliation.</p>
<h3 style="text-align:justify;">Pass the Knowledge</h3>
<p><img class="alignnone" src="http://www.pinaldave.com/bimg/devt16.jpg" alt="" width="651" height="361" /></p>
<p style="text-align:justify;">If I have to pick one advise which is extremely important related to training, I will pick &#8211; pass the knowledge. Once you have decided in favor of training, there is more to it than simply showing up and staying awake.  It is always a good idea to take notes – at the very least it will help you stay awake, but they will often serve as a good way to remember your training when you go back to work.  You can also use them to pass your new knowledge on to fellow employees, which can be very fun and rewarding.</p>
<h3 style="text-align:justify;">Right Place, Right Time and Right Training</h3>
<p><img class="alignnone" src="http://www.pinaldave.com/bimg/devt17.jpg" alt="" width="488" height="362" /></p>
<p style="text-align:justify;">There are so many ways to get developer training.  In-person and on the job training is easy to come by and is the most usual type of training, but don’t overlook my favorite type of training: On Demand.  Being able to learn at your own pace, own place and on your own time will make training a realistic goal for almost every employee.</p>
<p style="text-align:justify;">I can think of nothing more important in life than furthering your education.  Especially when you work in a field that is constantly changing – like technology.  Whether you like it or not, training is incredibly important.  That is why I feel it is so important to receive training.  And because there are so many different training formats – live, online, through books, through people – I am certain that we all can find a way to be trained that best suits our goals and personalities.</p>
<h3 style="text-align:justify;">The Teacher Within</h3>
<p style="text-align:justify;">If you think of anyone who is a master of the technology field or an incredibly successful developer (the obvious examples that spring to mind are Steve Jobs or Bill Gates), you will also find a teacher.  Both these individuals spent their lives developing better technology, but also educating other developers and the public about how to use these technologies and how it can change your life for the better.  I think that we all should strive to be like these wonderful teachers.  We might not be able to change the world, but we can certainly change a few lives around us.</p>
<p style="text-align:justify;">Even if we never turn into trainers ourselves , being trained as a student can be a good exercise.  We learn a lot and become better employees – and it would not be a stretch to say that this makes us better individuals, as well.</p>
<p style="text-align:justify;"><a href="http://www.pinaldave.com/bimg/dev18.jpg"><img class="alignnone" src="http://www.pinaldave.com/bimg/dev18.jpg" alt="" width="416" height="455" /></a></p>
<h3 style="text-align:justify;">Final Say</h3>
<p style="text-align:justify;">I think learning and growing in your chosen field is not only a good idea, career-wise, but can be fun, too!  I for one never feel more alive than when I am learning about something I am really passionate about.  I think my job title – technology evangelist – explains how enthusiastic I am about this subject.  But please don’t think that I am thinking of this as someone who wants to train and educate others (although this is also one of my passions).  I am also a passionate student.  I enjoy learning new things and am always on the lookout for new ways to learn and new people to learn from.</p>
<p style="text-align:justify;">Reference: <strong>Pinal Dave (<a href="http://blog.sqlauthority.com/" target="_blank">http://blog.sqlauthority.com</a>)</strong></p>
<div></div>
<div></div>
<div></div>
<br />Filed under: <a href='http://blog.sqlauthority.com/category/developer-training/'>Developer Training</a>, <a href='http://blog.sqlauthority.com/category/technology/postaday/'>PostADay</a>, <a href='http://blog.sqlauthority.com/category/technology/sql/'>SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-authority/'>SQL Authority</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-query/'>SQL Query</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-server/'>SQL Server</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-tips-and-tricks/'>SQL Tips and Tricks</a>, <a href='http://blog.sqlauthority.com/category/technology/t-sql/'>T SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/'>Technology</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqlauthority.wordpress.com/18965/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqlauthority.wordpress.com/18965/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqlauthority.wordpress.com/18965/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqlauthority.wordpress.com/18965/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sqlauthority.wordpress.com/18965/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sqlauthority.wordpress.com/18965/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sqlauthority.wordpress.com/18965/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sqlauthority.wordpress.com/18965/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqlauthority.wordpress.com/18965/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqlauthority.wordpress.com/18965/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqlauthority.wordpress.com/18965/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqlauthority.wordpress.com/18965/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqlauthority.wordpress.com/18965/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqlauthority.wordpress.com/18965/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&#038;blog=668536&#038;post=18965&#038;subd=sqlauthority&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.sqlauthority.com/2012/06/01/developer-training-a-conclusive-summary-part-5/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aa5a2264e8a27d802bb22ab6ccf688?s=96&#38;d=identicon" medium="image">
			<media:title type="html">pinaldave</media:title>
		</media:content>

		<media:content url="http://www.pinaldave.com/bimg/devt16.jpg" medium="image" />

		<media:content url="http://www.pinaldave.com/bimg/devt17.jpg" medium="image" />

		<media:content url="http://www.pinaldave.com/bimg/dev18.jpg" medium="image" />
	</item>
		<item>
		<title>Developer Training &#8211; Various Options for Maximum Benefit &#8211; Part 4</title>
		<link>http://blog.sqlauthority.com/2012/05/31/developer-training-various-options-for-maximum-benefit-part-4/</link>
		<comments>http://blog.sqlauthority.com/2012/05/31/developer-training-various-options-for-maximum-benefit-part-4/#comments</comments>
		<pubDate>Thu, 31 May 2012 01:30:27 +0000</pubDate>
		<dc:creator>pinaldave</dc:creator>
				<category><![CDATA[Developer Training]]></category>
		<category><![CDATA[PostADay]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Authority]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[T SQL]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=18963</guid>
		<description><![CDATA[Developer Training - Importance and Significance - Part 1 Developer Training – Employee Morals and Ethics – Part 2 Developer Training – Difficult Questions and Alternative Perspective - Part 3 Developer Training – Various Options for Developer Training – Part 4 Developer Training – A Conclusive Summary- Part 5 If you have been reading this series, by now [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&#038;blog=668536&#038;post=18963&#038;subd=sqlauthority&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong></strong><strong><a href="http://blog.sqlauthority.com/2012/05/28/developer-training-importance-and-significance-part-1/" target="_blank">Developer Training - Importance and Significance - Part 1</a></strong><br />
<strong><a href="http://blog.sqlauthority.com/2012/05/29/developer-training-employee-morals-and-ethics-part-2/" target="_blank">Developer Training – Employee Morals and Ethics – Part 2</a></strong><br />
<strong><a href="http://blog.sqlauthority.com/2012/05/30/developer-training-difficult-questions-and-alternative-perspective-part-3/" target="_blank">Developer Training – Difficult Questions and Alternative Perspective - Part 3</a></strong><br />
<strong><a href="http://blog.sqlauthority.com/2012/05/31/developer-training-various-options-for-maximum-benefit-part-4/" target="_blank">Developer Training – Various Options for Developer Training – Part 4</a></strong><br />
<strong><a href="http://blog.sqlauthority.com/2012/06/01/developer-training-a-conclusive-summary-part-5/" target="_blank">Developer Training – A Conclusive Summary- Part 5</a></strong></p>
<hr />
<p style="text-align:justify;">If you have been reading this series, by now you are aware of all the pros and cons that can come along with training.  We’ve asked and answered hard questions, and investigated them “whys” and “hows” of training.  Now it is time to talk about all the different kinds of training that are out there!</p>
<h3 style="text-align:justify;">On Job Training</h3>
<p style="text-align:justify;"><img class="alignnone" src="http://www.pinaldave.com/bimg/devt12.jpg" alt="" width="488" height="358" /></p>
<p style="text-align:justify;">The most common type of training is on the job training.  Everyone receives this kind of education – even experts who come in to consult have to be taught where the printer, pens, and copy machines are.  If you are thinking about more concrete topics, though, on the job training can be some of the easiest to come across.  Picture this: someone in the company whom you really admire is hard at work on a project.  You come up to them and ask to help them out – if they are a busy developer, the odds are that they will say “yes, please!”   If you phrase your question as an offer of help, you can receive training without ever putting someone in the awkward position of acting as a mentor.  However, some people may want the task of being a mentor.  It can never hurt to ask.  Most people will be more than willing to pass their knowledge along.</p>
<h3 style="text-align:justify;">Extreme Programming</h3>
<p style="text-align:justify;">If your company and coworkers are willing, you can even investigate Extreme Programming.  This is a type of programming that allows small teams to quickly develop code and products that are released with almost immediate user feedback.  You can find more information at <a href="http://www.extremeprogramming.org/">http://www.extremeprogramming.org/</a>.  If this is something your company could use, suggest it to your supervisor.  Even if they say no, it will make it clear that you are a go-getter who is interested in new and exciting projects.  If the answer is yes, then you have the opportunity to get some of the best on the job training around.</p>
<h3 style="text-align:justify;">In Person Training</h3>
<div class="wp-caption alignnone" style="width: 510px"><a href="http://www.pinaldave.com/bimg/devt14.jpg" target="_blank"><img class=" " src="http://www.pinaldave.com/bimg/devt14.jpg" alt="" width="500" /></a><p class="wp-caption-text">Click on Image to Enlarge</p></div>
<p style="text-align:justify;">When you say the word “training,” most people’s minds go back to the classroom, an image they are familiar with.  While training doesn’t always have to be in a traditional setting, because it is so familiar it can also be the most valuable type of training.  There are many ways to get training through a live instructor.  Some companies may be willing to send a representative to you, where employees will get training, sometimes food and coffee, and a live instructor who can answer questions immediately.  Sometimes these trainers are also able to do consultations at the same time, which can invaluable to a company.  If you are the one to asks your supervisor for a training session that can also be turned into a consultation, you may stick in their minds as an incredibly dedicated employee.  If you can’t find a representative, local colleges can also be a good resource for free or cheap classes – or they may have representatives coming who are willing to take on a few more students.</p>
<h3 style="text-align:justify;">Benefits of On Demand Developer Training</h3>
<p style="text-align:justify;"><img class="alignnone" src="http://www.pinaldave.com/bimg/devt15.jpg" alt="" width="500" /></p>
<p style="text-align:justify;">Of course, you can often get the best of all these types of training with online or On Demand training.  You can get the benefit of a live instructor who is willing to answer questions (although in this case, usually through e-mail or other online venues), there are often real-world examples to follow along – like on the job training – and best of all you can learn whenever you have the time or need.  Did a problem with your server come up at midnight when all your supervisors are safe at home and probably in bed?  No problem!  On Demand training is especially useful if you need to slow down, pause, or rewind a training session.  Not even a real-life instructor can do that!</p>
<p>When I was writing this blog post, I felt that each of the subject, which I have covered can be blog posts of itself. However, I wanted to keep the the blog post concise and so touch based on three major training aspects 1) On Job Training 2) In Person Training and 3) Online training. Here is the question for you &#8211; is there any other kind of training methods available, which are effective and one should consider it? If yes, what are those, I may write a follow up blog post on the same subject next week.</p>
<p style="text-align:justify;">Reference: <strong>Pinal Dave (<a href="http://blog.sqlauthority.com/" target="_blank">http://blog.sqlauthority.com</a>)</strong></p>
<div></div>
<div></div>
<br />Filed under: <a href='http://blog.sqlauthority.com/category/developer-training/'>Developer Training</a>, <a href='http://blog.sqlauthority.com/category/technology/postaday/'>PostADay</a>, <a href='http://blog.sqlauthority.com/category/technology/sql/'>SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-authority/'>SQL Authority</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-query/'>SQL Query</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-server/'>SQL Server</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-tips-and-tricks/'>SQL Tips and Tricks</a>, <a href='http://blog.sqlauthority.com/category/technology/t-sql/'>T SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/'>Technology</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqlauthority.wordpress.com/18963/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqlauthority.wordpress.com/18963/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqlauthority.wordpress.com/18963/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqlauthority.wordpress.com/18963/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sqlauthority.wordpress.com/18963/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sqlauthority.wordpress.com/18963/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sqlauthority.wordpress.com/18963/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sqlauthority.wordpress.com/18963/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqlauthority.wordpress.com/18963/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqlauthority.wordpress.com/18963/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqlauthority.wordpress.com/18963/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqlauthority.wordpress.com/18963/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqlauthority.wordpress.com/18963/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqlauthority.wordpress.com/18963/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&#038;blog=668536&#038;post=18963&#038;subd=sqlauthority&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.sqlauthority.com/2012/05/31/developer-training-various-options-for-maximum-benefit-part-4/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aa5a2264e8a27d802bb22ab6ccf688?s=96&#38;d=identicon" medium="image">
			<media:title type="html">pinaldave</media:title>
		</media:content>

		<media:content url="http://www.pinaldave.com/bimg/devt12.jpg" medium="image" />

		<media:content url="http://www.pinaldave.com/bimg/devt14.jpg" medium="image" />

		<media:content url="http://www.pinaldave.com/bimg/devt15.jpg" medium="image" />
	</item>
		<item>
		<title>Developer Training &#8211; Difficult Questions and Alternative Perspective &#8211; Part 3</title>
		<link>http://blog.sqlauthority.com/2012/05/30/developer-training-difficult-questions-and-alternative-perspective-part-3/</link>
		<comments>http://blog.sqlauthority.com/2012/05/30/developer-training-difficult-questions-and-alternative-perspective-part-3/#comments</comments>
		<pubDate>Wed, 30 May 2012 01:30:53 +0000</pubDate>
		<dc:creator>pinaldave</dc:creator>
				<category><![CDATA[Developer Training]]></category>
		<category><![CDATA[PostADay]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Authority]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[T SQL]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=18960</guid>
		<description><![CDATA[Developer Training - Importance and Significance - Part 1 Developer Training – Employee Morals and Ethics – Part 2 Developer Training – Difficult Questions and Alternative Perspective - Part 3 Developer Training – Various Options for Developer Training – Part 4 Developer Training – A Conclusive Summary- Part 5 Congratulations!  You are now a fully trained developer!  You [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&#038;blog=668536&#038;post=18960&#038;subd=sqlauthority&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong></strong><strong><a href="http://blog.sqlauthority.com/2012/05/28/developer-training-importance-and-significance-part-1/" target="_blank">Developer Training - Importance and Significance - Part 1</a></strong><br />
<strong><a href="http://blog.sqlauthority.com/2012/05/29/developer-training-employee-morals-and-ethics-part-2/" target="_blank">Developer Training – Employee Morals and Ethics – Part 2</a></strong><br />
<strong><a href="http://blog.sqlauthority.com/2012/05/30/developer-training-difficult-questions-and-alternative-perspective-part-3/" target="_blank">Developer Training – Difficult Questions and Alternative Perspective - Part 3</a></strong><br />
<strong><a href="http://blog.sqlauthority.com/2012/05/31/developer-training-various-options-for-maximum-benefit-part-4/" target="_blank">Developer Training – Various Options for Developer Training – Part 4</a></strong><br />
<strong><a href="http://blog.sqlauthority.com/2012/06/01/developer-training-a-conclusive-summary-part-5/" target="_blank">Developer Training – A Conclusive Summary- Part 5</a></strong></p>
<hr />
<p style="text-align:justify;">Congratulations!  You are now a fully trained developer!  You spent hours in a classroom, watching webinars, and reading materials.  You are now more educated and more prepared than ever before.  Now what?</p>
<h3 style="text-align:justify;">Stay or Quit</h3>
<p style="text-align:justify;">The simple answer is that you now have two options – stay where you are or move on to a new job.  Even though you might now be smarter than you have ever felt before, this can still be a tough decision to make.  You feel extra trained and ready for a promotion or a raise, but you and your employer might not see eye to eye on this issue.  The logical conclusion is to go on a job hunt, but that might not be the most ethical thing to do.</p>
<div class="wp-caption alignnone" style="width: 510px"><a href="http://www.pinaldave.com/bimg/devt8.jpg" target="_blank"><img class="  " src="http://www.pinaldave.com/bimg/devt8.jpg" alt="" width="500" height="275" /></a><p class="wp-caption-text">Click Image to Enlarge</p></div>
<h3 style="text-align:justify;">Manager&#8217;s Perspective</h3>
<div class="wp-caption alignleft" style="width: 267px"><a href="http://www.pinaldave.com/bimg/devt10.jpg"><img src="http://www.pinaldave.com/bimg/devt10.jpg" alt="" width="257" height="574" /></a><p class="wp-caption-text">Click Image to Enlarge</p></div>
<p style="text-align:justify;">Try to see the issue from your manager’s perspective.  You feel that you have just spent a lot of time and energy getting trained, and you should be rewarded.  But they have invested their time and energy in <em>you</em>.  They might see the training as a way to help you complete the goals they require from you, or as a way to help you complete tasks that will ultimately end in a reward or promotion.</p>
<h3 style="text-align:justify;">Moral Compass</h3>
<p style="text-align:justify;">As in most cases, honesty is the best policy.  Be open with your manager about your expectations, and ask them to explain their goals.  When there is open and honest communication, everyone can walk away happy.  If you’re unable to discuss with your manager for one reason or another, just try to keep the company policy in mind and follow your own moral compass.  If all else fails, and your company is unwilling to make allowances for your new value, offer to pay the company back for the training before moving on your way.</p>
<p style="text-align:justify;">Whether you stay at your old job or move on to a new one, you are still faced with the question of what you’re going to do with all your new knowledge.  If you feel comfortable, offer to train others around you who are interested in the same subject.  This can look very good on your resume, and if you are working in a team environment it is sure to help you in the long run!</p>
<h3 style="text-align:justify;">What Next?</h3>
<p style="text-align:justify;">You can even offer to train other trainers at the company – managers, those above you, or even report back to your original trainer about how your education is helping you in the work place.  Obviously this should be completely voluntary on the trainer’s part.  Taking advice from a “newbie” may not be their favorite idea, but it could also show the company that you are open to expanding your horizons and being helpful to everyone around you.</p>
<h3 style="text-align:justify;">Last in Line for Opportunity</h3>
<div class="wp-caption alignnone" style="width: 510px"><a href="http://www.pinaldave.com/bimg/devt9.jpg" target="_blank"><img class=" " src="http://www.pinaldave.com/bimg/devt9.jpg" alt="" width="500" /></a><p class="wp-caption-text">Click Image to Enlarge</p></div>
<p style="text-align:justify;">At this time, let us address a subject related to training and what to do with it – what if you are always overlooked for training?  This can as thorny a problem as receiving training in the first place.  The best advice is to let your supervisors know that you are always open to training and very interested in certain topics.  If you are consistently passed over, be patient.  Your turn will probably come, but the company as a whole has to focus on other problems at the moment.  If you feel that there are more personal issues at play, be sure to bring this up with your supervisor in a calm and professional manager so that everything can be worked out best for both parties.</p>
<h3 style="text-align:justify;">You, Yourself and Your Future!</h3>
<p><img class="alignnone" src="http://www.pinaldave.com/bimg/devt11.jpg" alt="" width="485" height="359" /></p>
<p style="text-align:justify;">If all else fails, offer to pay for training yourself.  Perhaps money problems are at the root of being passed over.  Even if there are other reasons, offering to pay your own way shows your dedication and could work out well for you in the long run.  <em><strong>Always remember – in life you have to go out and make your own way, you cannot always sit and wait for things to land in your lap.</strong></em></p>
<p style="text-align:justify;">Reference: <strong>Pinal Dave (<a href="http://blog.sqlauthority.com/" target="_blank">http://blog.sqlauthority.com</a>)</strong></p>
<div></div>
<div></div>
<div></div>
<div></div>
<br />Filed under: <a href='http://blog.sqlauthority.com/category/developer-training/'>Developer Training</a>, <a href='http://blog.sqlauthority.com/category/technology/postaday/'>PostADay</a>, <a href='http://blog.sqlauthority.com/category/technology/sql/'>SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-authority/'>SQL Authority</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-query/'>SQL Query</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-server/'>SQL Server</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-tips-and-tricks/'>SQL Tips and Tricks</a>, <a href='http://blog.sqlauthority.com/category/technology/t-sql/'>T SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/'>Technology</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqlauthority.wordpress.com/18960/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqlauthority.wordpress.com/18960/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqlauthority.wordpress.com/18960/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqlauthority.wordpress.com/18960/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sqlauthority.wordpress.com/18960/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sqlauthority.wordpress.com/18960/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sqlauthority.wordpress.com/18960/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sqlauthority.wordpress.com/18960/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqlauthority.wordpress.com/18960/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqlauthority.wordpress.com/18960/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqlauthority.wordpress.com/18960/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqlauthority.wordpress.com/18960/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqlauthority.wordpress.com/18960/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqlauthority.wordpress.com/18960/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&#038;blog=668536&#038;post=18960&#038;subd=sqlauthority&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.sqlauthority.com/2012/05/30/developer-training-difficult-questions-and-alternative-perspective-part-3/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aa5a2264e8a27d802bb22ab6ccf688?s=96&#38;d=identicon" medium="image">
			<media:title type="html">pinaldave</media:title>
		</media:content>

		<media:content url="http://www.pinaldave.com/bimg/devt8.jpg" medium="image" />

		<media:content url="http://www.pinaldave.com/bimg/devt10.jpg" medium="image" />

		<media:content url="http://www.pinaldave.com/bimg/devt9.jpg" medium="image" />

		<media:content url="http://www.pinaldave.com/bimg/devt11.jpg" medium="image" />
	</item>
		<item>
		<title>Developer Training &#8211; Employee Morals and Ethics &#8211; Part 2</title>
		<link>http://blog.sqlauthority.com/2012/05/29/developer-training-employee-morals-and-ethics-part-2/</link>
		<comments>http://blog.sqlauthority.com/2012/05/29/developer-training-employee-morals-and-ethics-part-2/#comments</comments>
		<pubDate>Tue, 29 May 2012 01:30:10 +0000</pubDate>
		<dc:creator>pinaldave</dc:creator>
				<category><![CDATA[Developer Training]]></category>
		<category><![CDATA[PostADay]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Authority]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[T SQL]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=18958</guid>
		<description><![CDATA[Developer Training - Importance and Significance - Part 1 Developer Training – Employee Morals and Ethics – Part 2 Developer Training – Difficult Questions and Alternative Perspective - Part 3 Developer Training – Various Options for Developer Training – Part 4 Developer Training – A Conclusive Summary- Part 5 If you have been reading this series of posts [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&#038;blog=668536&#038;post=18958&#038;subd=sqlauthority&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong></strong><strong><a href="http://blog.sqlauthority.com/2012/05/28/developer-training-importance-and-significance-part-1/" target="_blank">Developer Training - Importance and Significance - Part 1</a></strong><br />
<strong><a href="http://blog.sqlauthority.com/2012/05/29/developer-training-employee-morals-and-ethics-part-2/" target="_blank">Developer Training – Employee Morals and Ethics – Part 2</a></strong><br />
<strong><a href="http://blog.sqlauthority.com/2012/05/30/developer-training-difficult-questions-and-alternative-perspective-part-3/" target="_blank">Developer Training – Difficult Questions and Alternative Perspective - Part 3</a></strong><br />
<strong><a href="http://blog.sqlauthority.com/2012/05/31/developer-training-various-options-for-maximum-benefit-part-4/" target="_blank">Developer Training – Various Options for Developer Training – Part 4</a></strong><br />
<strong><a href="http://blog.sqlauthority.com/2012/06/01/developer-training-a-conclusive-summary-part-5/" target="_blank">Developer Training – A Conclusive Summary- Part 5</a></strong></p>
<hr />
<p style="text-align:justify;">If you have been reading this series of posts about Developer Training, you can probably determine where my mind lies in the matter – firmly “pro.”  There are many reasons to think that training is an excellent idea for the company.  In the end, it may seem like the company gets all the benefits and the employee has just wasted a few hours in a dark, stuffy room.  However, don’t let yourself be fooled, this is not the case!</p>
<h3 style="text-align:justify;">Training, Company and YOU!</h3>
<p style="text-align:justify;">Do not forget, that as an employee, you are your company’s best asset.  Training is meant to benefit the company, of course, but in the end, YOU, the employee, is the one who walks away with a lot of useful knowledge in your head.  This post will discuss what to do with that knowledge, how to acquire it, and who should pay for it.</p>
<h3 style="text-align:justify;">Eternal Question &#8211; Who Pays for Training?</h3>
<p style="text-align:justify;">When the subject of training comes up, money is often the sticky issue.  Some companies will argue that because the employee is the one who benefits the most, he or she should pay for it.  Of course, whenever money is discuss, emotions tend to follow along, and being told you have to pay money for mandatory training often results in very unhappy employees – the opposite result of what the training was supposed to accomplish.  Therefore, many companies will pay for the training.  However, if your company is reluctant to pay for necessary training, or is hesitant to pay for a specific course that is extremely expensive, there is always the art of compromise.  The employee and the company can split the cost of the training – after all, both the company and the employee will be benefiting.</p>
<p style="text-align:center;"><strong>[Click on following image to answer important question]</strong></p>
<div class="wp-caption alignnone" style="width: 510px"><a href="http://www.pinaldave.com/bimg/dt5.jpg"><img class="  " src="http://www.pinaldave.com/bimg/dt5.jpg" alt="" width="500" height="202" /></a><p class="wp-caption-text"><strong>Click to Enlarge</strong></p></div>
<p style="text-align:justify;"> This kind of “hybrid” pay scheme can be split any way that is mutually beneficial.  There is the obvious 50/50 split, but for extremely expensive classes or conferences, this still might be prohibitively expensive for the employee.  If you are facing this situation, here are some example solutions you could suggest to your employer:  travel reimbursement, paid leave, payment for only the tuition.  There are even more complex solutions – the company could pay back the employee after the training <em>and</em> project has been completed.</p>
<h3 style="text-align:justify;">Training is not Vacation</h3>
<p style="text-align:justify;"><img class="alignnone" src="http://www.pinaldave.com/bimg/devt7.jpg" alt="" width="435" height="298" /></p>
<p style="text-align:justify;">Once the classes have been settled on, and the question of payment has been answered, it is time to attend your class or travel to your conference!  The first rule is one that your mothers probably instilled in you as well – have a good attitude.  While you might be looking forward to your time off work, going to an interesting class, hopefully with some friends and coworkers, but do not mistake this time as a vacation.  It can be tempting to only have fun, but don’t forget to learn as well.  I call this “attending sincerely.”  Pay attention, have an open mind and good attitude, and don’t forget to take notes!  You might be surprised how many people will want to see what you learned when you go back.</p>
<h3 style="text-align:justify;">Report Back the Learning</h3>
<p style="text-align:justify;">When you get back to work, those notes will come in handy.  Your supervisor and coworkers might want you to give a short presentation about what you learned.  Attending these classes can make you almost a celebrity.  Don’t be too nervous about these presentations, and don’t feel like they are meant to be a test of your dedication.  Many people will be genuinely curious – and maybe a little jealous that you go to go learn something new.  Be generous with your notes and be willing to pass your learning on to others through mini-training sessions of your own.</p>
<p style="text-align:center;"><strong>[Click on following image to answer important question]</strong></p>
<div class="wp-caption alignnone" style="width: 510px"><a href="http://www.pinaldave.com/bimg/dt6.jpg" target="_blank"><img class=" " src="http://www.pinaldave.com/bimg/dt6.jpg" alt="" width="500" /></a><p class="wp-caption-text"><strong>Click to Enlarge</strong></p></div>
<h3 style="text-align:justify;">Practice New Learning</h3>
<p style="text-align:justify;">On top of helping to train others, don’t forget to put your new knowledge to use!  Your notes will come in handy for this, and you can even include your plans for the future in your presentation when you return.  This is a good way to demonstrate to your bosses that the money they paid (hopefully they paid!) is going to be put to good use.</p>
<h3 style="text-align:justify;">Feedback to Manager</h3>
<p style="text-align:justify;">When you return, be sure to set aside a few minutes to talk about your training with your manager.  Be perfectly honest – your manager wants to know the good <em>and</em> the bad.  If you had a truly miserable time, do not lie and say it was the best experience – you and others may be forced to attend the same training over and over again!  Of course, you do not want to sound like a complainer, so make sure that your summary includes the good news as well.  Your manager may be able to help you understand more of what they wanted you to learn, too.</p>
<h3 style="text-align:justify;">Win-Win Situation</h3>
<p style="text-align:justify;">In the end, remember that training is supposed to be a benefit to the employer as well as the employee.  Make sure that you share your information and that you give feedback about how you felt the sessions went as well as how you think this training can be implemented at the company immediately.</p>
<p style="text-align:justify;">Reference: <strong>Pinal Dave (<a href="http://blog.sqlauthority.com/" target="_blank">http://blog.sqlauthority.com</a>)</strong></p>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<br />Filed under: <a href='http://blog.sqlauthority.com/category/developer-training/'>Developer Training</a>, <a href='http://blog.sqlauthority.com/category/technology/postaday/'>PostADay</a>, <a href='http://blog.sqlauthority.com/category/technology/sql/'>SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-authority/'>SQL Authority</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-query/'>SQL Query</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-server/'>SQL Server</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-tips-and-tricks/'>SQL Tips and Tricks</a>, <a href='http://blog.sqlauthority.com/category/technology/t-sql/'>T SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/'>Technology</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqlauthority.wordpress.com/18958/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqlauthority.wordpress.com/18958/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqlauthority.wordpress.com/18958/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqlauthority.wordpress.com/18958/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sqlauthority.wordpress.com/18958/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sqlauthority.wordpress.com/18958/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sqlauthority.wordpress.com/18958/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sqlauthority.wordpress.com/18958/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqlauthority.wordpress.com/18958/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqlauthority.wordpress.com/18958/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqlauthority.wordpress.com/18958/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqlauthority.wordpress.com/18958/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqlauthority.wordpress.com/18958/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqlauthority.wordpress.com/18958/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&#038;blog=668536&#038;post=18958&#038;subd=sqlauthority&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.sqlauthority.com/2012/05/29/developer-training-employee-morals-and-ethics-part-2/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aa5a2264e8a27d802bb22ab6ccf688?s=96&#38;d=identicon" medium="image">
			<media:title type="html">pinaldave</media:title>
		</media:content>

		<media:content url="http://www.pinaldave.com/bimg/dt5.jpg" medium="image" />

		<media:content url="http://www.pinaldave.com/bimg/devt7.jpg" medium="image" />

		<media:content url="http://www.pinaldave.com/bimg/dt6.jpg" medium="image" />
	</item>
		<item>
		<title>Developer Training &#8211; Importance and Significance &#8211; Part 1</title>
		<link>http://blog.sqlauthority.com/2012/05/28/developer-training-importance-and-significance-part-1/</link>
		<comments>http://blog.sqlauthority.com/2012/05/28/developer-training-importance-and-significance-part-1/#comments</comments>
		<pubDate>Mon, 28 May 2012 01:30:46 +0000</pubDate>
		<dc:creator>pinaldave</dc:creator>
				<category><![CDATA[Developer Training]]></category>
		<category><![CDATA[PostADay]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Authority]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[T SQL]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=18953</guid>
		<description><![CDATA[Developer Training - Importance and Significance - Part 1 Developer Training – Employee Morals and Ethics – Part 2 Developer Training – Difficult Questions and Alternative Perspective - Part 3 Developer Training – Various Options for Developer Training – Part 4 Developer Training – A Conclusive Summary- Part 5 Can anyone remember their final day of schooling?  This [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&#038;blog=668536&#038;post=18953&#038;subd=sqlauthority&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong></strong><strong><a href="http://blog.sqlauthority.com/2012/05/28/developer-training-importance-and-significance-part-1/" target="_blank">Developer Training - Importance and Significance - Part 1</a></strong><br />
<strong><a href="http://blog.sqlauthority.com/2012/05/29/developer-training-employee-morals-and-ethics-part-2/" target="_blank">Developer Training – Employee Morals and Ethics – Part 2</a></strong><br />
<strong><a href="http://blog.sqlauthority.com/2012/05/30/developer-training-difficult-questions-and-alternative-perspective-part-3/" target="_blank">Developer Training – Difficult Questions and Alternative Perspective - Part 3</a></strong><br />
<strong><a href="http://blog.sqlauthority.com/2012/05/31/developer-training-various-options-for-maximum-benefit-part-4/" target="_blank">Developer Training – Various Options for Developer Training – Part 4</a></strong><br />
<strong><a href="http://blog.sqlauthority.com/2012/06/01/developer-training-a-conclusive-summary-part-5/" target="_blank">Developer Training – A Conclusive Summary- Part 5</a></strong></p>
<hr />
<p style="text-align:justify;">Can anyone remember their final day of schooling?  This is probably a silly question because – of course you can!  Many people mark this as the most exciting, happiest day of their life.  It marks the end of testing, the end of following rules set by teachers, and the beginning of finally being able to earn money and work in your chosen field.</p>
<h3 style="text-align:justify;">Beginning in Real World</h3>
<p><img class="alignleft" src="http://www.pinaldave.com/bimg/devt1.jpg" alt="" /></p>
<p style="text-align:justify;">However, many former-students will be disappointed to find out that once they become employees, learning is not over.  Many companies are discovering the importance and benefits to training their employees.  You can breathe a sigh of relief, though, because much for this kind of training there are not usually tests!</p>
<p style="text-align:justify;">We often think that we go to school for our younger years so that we do all our learning all at once, and then for the rest of our lives we use that knowledge.  But in so many cases, but especially for developers, the opposite is true.  It takes many years of schools to learn the basics of a field, and then our careers are spent learning to become experts.</p>
<p style="text-align:justify;">For this, and so many other reasons, training is very important.  Example one: developer training leads to better employees.  A company is only as good as the people it employs, and one way to ensure that you have employed the right candidate is through training.  Training can take a regular “stone” and polish it into a “diamond.”  Employees who have been well-trained will be better at their jobs and produce a better product.</p>
<h3 style="text-align:justify;">Most Expensive Resource</h3>
<p style="text-align:justify;"><img class="alignnone" src="http://www.pinaldave.com/bimg/devt3.png" alt="" width="500" height="303" /></p>
<p style="text-align:justify;">Did you know that one of the most expensive operating costs for any company is not buying goods, or advertising, but its employees – especially having to hire new employees.  Bringing in new people, getting them up to speed, and providing them with perks to attract them to a company is a huge cost for companies.  So employee retention – keep the employees you already have, and keeping them happy – is incredibly important from a business aspect.  And research shows that a well-trained employee is a happy employee.  They feel more confident in their job, happier with their position, and more cared-about – and therefore less likely to leave in search of a better job.  Employee training leads to better retention.</p>
<h3 style="text-align:justify;">Good Moral</h3>
<p><img class="alignleft" src="http://www.pinaldave.com/bimg/devt4.jpg" alt="" width="275" /></p>
<p style="text-align:justify;">On the subject of keeping employees happy in order to keep them at a company, the complement to that research shows that happier employees are more efficient and overall better at their jobs.  You don’t have to be a scientist to figure out why this is true.  An employee who feel that his company cares about him and his educational future will work harder for the company.  He or she will put in that extra hour during the busy season that makes all the difference in the end.  Good morale is good for the company.</p>
<p style="text-align:justify;">If good morale is better for the company, you know that it goes hand-in-hand with something even better – better efficiency.  An employee who is well trained obviously knows more about their job and all the technical aspects.  That means when a problem crops up – and they inevitably do – this employee will be well-equipped to deal with that problem with fewer problems, and no need to go searching for help from higher up.  When employees are well trained, companies run more smoothly.</p>
<h3 style="text-align:justify;">A Better Product</h3>
<p style="text-align:justify;">Of course, all of these “pros” for employee training are leading up to the one thing that companies truly care about – a better product.  We have shown that employees who have been trained to be competitive in the market are happier at the company, they are more efficient, and their morale is better.  The overall result is that the company’s product – whether it is a database, piece of equipment, or even a physical good – is better.  And a better product will always be more competitive on the market.</p>
<p style="text-align:justify;">Reference: <strong>Pinal Dave (<a href="http://blog.sqlauthority.com/" target="_blank">http://blog.sqlauthority.com</a>)</strong></p>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<br />Filed under: <a href='http://blog.sqlauthority.com/category/developer-training/'>Developer Training</a>, <a href='http://blog.sqlauthority.com/category/technology/postaday/'>PostADay</a>, <a href='http://blog.sqlauthority.com/category/technology/sql/'>SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-authority/'>SQL Authority</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-query/'>SQL Query</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-server/'>SQL Server</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-tips-and-tricks/'>SQL Tips and Tricks</a>, <a href='http://blog.sqlauthority.com/category/technology/t-sql/'>T SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/'>Technology</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqlauthority.wordpress.com/18953/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqlauthority.wordpress.com/18953/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqlauthority.wordpress.com/18953/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqlauthority.wordpress.com/18953/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sqlauthority.wordpress.com/18953/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sqlauthority.wordpress.com/18953/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sqlauthority.wordpress.com/18953/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sqlauthority.wordpress.com/18953/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqlauthority.wordpress.com/18953/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqlauthority.wordpress.com/18953/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqlauthority.wordpress.com/18953/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqlauthority.wordpress.com/18953/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqlauthority.wordpress.com/18953/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqlauthority.wordpress.com/18953/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&#038;blog=668536&#038;post=18953&#038;subd=sqlauthority&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.sqlauthority.com/2012/05/28/developer-training-importance-and-significance-part-1/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aa5a2264e8a27d802bb22ab6ccf688?s=96&#38;d=identicon" medium="image">
			<media:title type="html">pinaldave</media:title>
		</media:content>

		<media:content url="http://www.pinaldave.com/bimg/devt1.jpg" medium="image" />

		<media:content url="http://www.pinaldave.com/bimg/devt3.png" medium="image" />

		<media:content url="http://www.pinaldave.com/bimg/devt4.jpg" medium="image" />
	</item>
		<item>
		<title>SQL SERVER &#8211; A Puzzle Part 3 &#8211; Fun with SEQUENCE in SQL Server 2012 &#8211; Guess the Next Value</title>
		<link>http://blog.sqlauthority.com/2012/05/27/sql-server-a-puzzle-part-3-fun-with-sequence-in-sql-server-2012-guess-the-next-value/</link>
		<comments>http://blog.sqlauthority.com/2012/05/27/sql-server-a-puzzle-part-3-fun-with-sequence-in-sql-server-2012-guess-the-next-value/#comments</comments>
		<pubDate>Sun, 27 May 2012 01:30:16 +0000</pubDate>
		<dc:creator>pinaldave</dc:creator>
				<category><![CDATA[PostADay]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Authority]]></category>
		<category><![CDATA[SQL Puzzle]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[T SQL]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=18944</guid>
		<description><![CDATA[Before continuing this blog post &#8211; please read the two part of the SEQUENCE Puzzle here A Puzzle – Fun with SEQUENCE in SQL Server 2012 – Guess the Next Value and A Puzzle Part 2 – Fun with SEQUENCE in SQL Server 2012 – Guess the Next Value Where we played a simple guessing game about predicting next value. The [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&#038;blog=668536&#038;post=18944&#038;subd=sqlauthority&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">Before continuing this blog post &#8211; please read the two part of the SEQUENCE Puzzle here <strong><a href="http://blog.sqlauthority.com/2012/05/25/sql-server-a-puzzle-fun-with-sequence-in-sql-server-2012-guess-the-next-value/" target="_blank">A Puzzle – Fun with SEQUENCE in SQL Server 2012 – Guess the Next Value</a> </strong>and <strong><a href="http://blog.sqlauthority.com/2012/05/26/sql-server-a-puzzle-part-2-fun-with-sequence-in-sql-server-2012-guess-the-next-value/" rel="bookmark" target="_blank">A Puzzle Part 2 – Fun with SEQUENCE in SQL Server 2012 – Guess the Next Value</a> </strong>Where we played a simple guessing game about predicting next value. The answers the of puzzle is shared on the blog posts as a comment. Now here is the next puzzle based on yesterday&#8217;s puzzle. I recently shared the puzzle of the blog post on local user group and it was appreciated by attendees.</p>
<p style="text-align:justify;">First execute the script which I have written here. Today&#8217;s script is bit different than yesterday&#8217;s script as well it will require you to do some service related activities. I suggest you try this on your personal computer&#8217;s test environment when no one is working on it. <strong>Do not attempt this on production server</strong> as it will for sure get you in trouble.</p>
<p style="text-align:justify;">The purpose to learn how sequence behave during the unexpected shutdowns and services restarts.</p>
<p style="text-align:justify;">Now guess what will be the next value as requested in the query.</p>
<p style="text-align:justify;"><code style="font-size:12px;"><span style="color:blue;">USE </span><span style="color:black;">AdventureWorks2012<br />
GO<br />
</span><span style="color:green;">-- Create sequence<br />
</span><span style="color:blue;">CREATE </span><span style="color:black;">SEQUENCE dbo.SequenceID </span><span style="color:blue;">AS </span><span style="color:black;">BIGINT<br />
START </span><span style="color:blue;">WITH </span><span style="color:black;">1<br />
INCREMENT </span><span style="color:blue;">BY </span><span style="color:black;">1<br />
MINVALUE 1<br />
MAXVALUE 500<br />
CYCLE<br />
CACHE 100</span><span style="color:gray;">;<br />
</span><span style="color:black;">GO<br />
</span><span style="color:green;">-- Following will return 1<br />
</span><span style="color:blue;">SELECT </span><span style="color:black;">next value </span><span style="color:blue;">FOR </span><span style="color:black;">dbo.SequenceID</span><span style="color:gray;">;<br />
</span><span style="color:green;">-------------------------------------<br />
-- simulate server crash by restarting service<br />
-- do not attempt this on production or any server in use<br />
------------------------------------<br />
-- Following will return ???<br />
</span><span style="color:blue;">SELECT </span><span style="color:black;">next value </span><span style="color:blue;">FOR </span><span style="color:black;">dbo.SequenceID</span><span style="color:gray;">;<br />
</span><span style="color:green;">-- Clean up<br />
</span><span style="color:blue;">DROP </span><span style="color:black;">SEQUENCE dbo.SequenceID</span><span style="color:gray;">;<br />
</span><span style="color:black;">GO</span></code></p>
<p style="text-align:justify;">Once the server is restarted what will be the next value for SequenceID. We can learn interesting trivia&#8217;s about this new feature of SQL Server using this puzzle. <strong>Hint:</strong> Pay special attention to the difference between new number and earlier number. Can you see the same number in the definition of the CREATE SEQUENCE?</p>
<p style="text-align:justify;"><strong>Bonus Question:</strong> How to avoid the behavior demonstrated in above mentioned query. Does it have any effect of performance?</p>
<p style="text-align:justify;">I suggest you try to attempt to answer this question without running this code in SQL Server 2012. You can <strong><a href="http://blog.sqlauthority.com/2007/09/09/sql-server-2005-start-stop-restart-sql-server-from-command-prompt/" target="_blank">restart SQL Server</a> </strong>using command prompt as well.</p>
<p style="text-align:justify;">I will follow up of the answer in comments below. Recently my friend Vinod Kumar wrote excellent blog post on <a href="http://blogs.extremeexperts.com/2012/05/24/sql-server-2012-using-sequence/" target="_blank">SQL Server 2012: Using SEQUENCE</a>, you can head over there for learning sequence in details.</p>
<p style="text-align:justify;">Reference: <strong>Pinal Dave (<a href="http://blog.sqlauthority.com/" target="_blank">http://blog.sqlauthority.com</a>)</strong></p>
<div></div>
<div></div>
<br />Filed under: <a href='http://blog.sqlauthority.com/category/technology/postaday/'>PostADay</a>, <a href='http://blog.sqlauthority.com/category/technology/sql/'>SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-authority/'>SQL Authority</a>, <a href='http://blog.sqlauthority.com/category/sql-puzzle/'>SQL Puzzle</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-query/'>SQL Query</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-server/'>SQL Server</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-tips-and-tricks/'>SQL Tips and Tricks</a>, <a href='http://blog.sqlauthority.com/category/technology/t-sql/'>T SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/'>Technology</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqlauthority.wordpress.com/18944/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqlauthority.wordpress.com/18944/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqlauthority.wordpress.com/18944/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqlauthority.wordpress.com/18944/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sqlauthority.wordpress.com/18944/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sqlauthority.wordpress.com/18944/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sqlauthority.wordpress.com/18944/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sqlauthority.wordpress.com/18944/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqlauthority.wordpress.com/18944/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqlauthority.wordpress.com/18944/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqlauthority.wordpress.com/18944/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqlauthority.wordpress.com/18944/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqlauthority.wordpress.com/18944/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqlauthority.wordpress.com/18944/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&#038;blog=668536&#038;post=18944&#038;subd=sqlauthority&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.sqlauthority.com/2012/05/27/sql-server-a-puzzle-part-3-fun-with-sequence-in-sql-server-2012-guess-the-next-value/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aa5a2264e8a27d802bb22ab6ccf688?s=96&#38;d=identicon" medium="image">
			<media:title type="html">pinaldave</media:title>
		</media:content>
	</item>
		<item>
		<title>SQL SERVER &#8211; A Puzzle Part 2 &#8211; Fun with SEQUENCE in SQL Server 2012 &#8211; Guess the Next Value</title>
		<link>http://blog.sqlauthority.com/2012/05/26/sql-server-a-puzzle-part-2-fun-with-sequence-in-sql-server-2012-guess-the-next-value/</link>
		<comments>http://blog.sqlauthority.com/2012/05/26/sql-server-a-puzzle-part-2-fun-with-sequence-in-sql-server-2012-guess-the-next-value/#comments</comments>
		<pubDate>Sat, 26 May 2012 01:30:43 +0000</pubDate>
		<dc:creator>pinaldave</dc:creator>
				<category><![CDATA[PostADay]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Authority]]></category>
		<category><![CDATA[SQL Puzzle]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[T SQL]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=18936</guid>
		<description><![CDATA[Before continuing this blog post &#8211; please read the first part of the SEQUENCE Puzzle here A Puzzle – Fun with SEQUENCE in SQL Server 2012 – Guess the Next Value. Where we played a simple guessing game about predicting next value. The answers the of puzzle is shared on the blog posts as a comment. Now [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&#038;blog=668536&#038;post=18936&#038;subd=sqlauthority&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">Before continuing this blog post &#8211; please read the first part of the SEQUENCE Puzzle here <strong><a href="http://blog.sqlauthority.com/2012/05/25/sql-server-a-puzzle-fun-with-sequence-in-sql-server-2012-guess-the-next-value/" target="_blank">A Puzzle – Fun with SEQUENCE in SQL Server 2012 – Guess the Next Value</a></strong>. Where we played a simple guessing game about predicting next value. The answers the of puzzle is shared on the blog posts as a comment. Now here is the next puzzle based on yesterday&#8217;s puzzle.</p>
<p style="text-align:justify;">First execute the script which I have written here. The only difference between yesterday&#8217;s script is that I have removed the MINVALUE as 1 from the syntax. Now guess what will be the next value as requested in the query.</p>
<p style="text-align:justify;"><code style="font-size:12px;"><span style="color:blue;">USE </span><span style="color:black;">TempDB<br />
GO<br />
</span><span style="color:green;">-- Create sequence<br />
</span><span style="color:blue;">CREATE </span><span style="color:black;">SEQUENCE dbo.SequenceID </span><span style="color:blue;">AS </span><span style="color:black;">BIGINT<br />
START </span><span style="color:blue;">WITH </span><span style="color:black;">3<br />
INCREMENT </span><span style="color:blue;">BY </span><span style="color:black;">1<br />
MAXVALUE 5<br />
CYCLE<br />
NO CACHE</span><span style="color:gray;">;<br />
</span><span style="color:black;">GO<br />
</span><span style="color:green;">-- Following will return 3<br />
</span><span style="color:blue;">SELECT </span><span style="color:black;">next value </span><span style="color:blue;">FOR </span><span style="color:black;">dbo.SequenceID</span><span style="color:gray;">;<br />
</span><span style="color:green;">-- Following will return 4<br />
</span><span style="color:blue;">SELECT </span><span style="color:black;">next value </span><span style="color:blue;">FOR </span><span style="color:black;">dbo.SequenceID</span><span style="color:gray;">;<br />
</span><span style="color:green;">-- Following will return 5<br />
</span><span style="color:blue;">SELECT </span><span style="color:black;">next value </span><span style="color:blue;">FOR </span><span style="color:black;">dbo.SequenceID</span><span style="color:gray;">;<br />
</span><span style="color:green;">-- Following will return which number<br />
</span><span style="color:blue;">SELECT </span><span style="color:black;">next value </span><span style="color:blue;">FOR </span><span style="color:black;">dbo.SequenceID</span><span style="color:gray;">;<br />
</span><span style="color:green;">-- Clean up<br />
</span><span style="color:blue;">DROP </span><span style="color:black;">SEQUENCE dbo.SequenceID</span><span style="color:gray;">;<br />
</span><span style="color:black;">GO</span></code></p>
<p style="text-align:justify;">Above script gave me following resultset.</p>
<p style="text-align:justify;"><img class="alignnone" src="http://www.pinaldave.com/bimg/seqpuz.jpg" alt="" width="481" height="371" /></p>
<p style="text-align:justify;">3 is the starting value and 5 is the maximum value. <em><strong>Once Sequence reaches to maximum value what happens? and WHY?</strong></em></p>
<p style="text-align:justify;">I (kindly) suggest you try to attempt to answer this question without running this code in SQL Server 2012. I am very confident that irrespective of SQL Server version you are running you will have great learning. I will follow up of the answer in comments below. Recently my friend Vinod Kumar wrote excellent blog post on <a href="http://blogs.extremeexperts.com/2012/05/24/sql-server-2012-using-sequence/" target="_blank">SQL Server 2012: Using SEQUENCE</a>, you can head over there for learning sequence in details.</p>
<p style="text-align:justify;">Reference: <strong>Pinal Dave (<a href="http://blog.sqlauthority.com/" target="_blank">http://blog.sqlauthority.com</a>)</strong></p>
<div></div>
<div></div>
<div></div>
<div></div>
<br />Filed under: <a href='http://blog.sqlauthority.com/category/technology/postaday/'>PostADay</a>, <a href='http://blog.sqlauthority.com/category/technology/sql/'>SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-authority/'>SQL Authority</a>, <a href='http://blog.sqlauthority.com/category/sql-puzzle/'>SQL Puzzle</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-query/'>SQL Query</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-server/'>SQL Server</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-tips-and-tricks/'>SQL Tips and Tricks</a>, <a href='http://blog.sqlauthority.com/category/technology/t-sql/'>T SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/'>Technology</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqlauthority.wordpress.com/18936/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqlauthority.wordpress.com/18936/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqlauthority.wordpress.com/18936/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqlauthority.wordpress.com/18936/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sqlauthority.wordpress.com/18936/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sqlauthority.wordpress.com/18936/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sqlauthority.wordpress.com/18936/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sqlauthority.wordpress.com/18936/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqlauthority.wordpress.com/18936/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqlauthority.wordpress.com/18936/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqlauthority.wordpress.com/18936/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqlauthority.wordpress.com/18936/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqlauthority.wordpress.com/18936/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqlauthority.wordpress.com/18936/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&#038;blog=668536&#038;post=18936&#038;subd=sqlauthority&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.sqlauthority.com/2012/05/26/sql-server-a-puzzle-part-2-fun-with-sequence-in-sql-server-2012-guess-the-next-value/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aa5a2264e8a27d802bb22ab6ccf688?s=96&#38;d=identicon" medium="image">
			<media:title type="html">pinaldave</media:title>
		</media:content>

		<media:content url="http://www.pinaldave.com/bimg/seqpuz.jpg" medium="image" />
	</item>
		<item>
		<title>SQL SERVER &#8211; A Puzzle &#8211; Fun with SEQUENCE in SQL Server 2012 &#8211; Guess the Next Value</title>
		<link>http://blog.sqlauthority.com/2012/05/25/sql-server-a-puzzle-fun-with-sequence-in-sql-server-2012-guess-the-next-value/</link>
		<comments>http://blog.sqlauthority.com/2012/05/25/sql-server-a-puzzle-fun-with-sequence-in-sql-server-2012-guess-the-next-value/#comments</comments>
		<pubDate>Fri, 25 May 2012 01:30:38 +0000</pubDate>
		<dc:creator>pinaldave</dc:creator>
				<category><![CDATA[PostADay]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Authority]]></category>
		<category><![CDATA[SQL Puzzle]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[T SQL]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=18926</guid>
		<description><![CDATA[Yesterday my friend Vinod Kumar wrote excellent blog post on SQL Server 2012: Using SEQUENCE. I personally enjoyed reading the content on this subject. While I was reading the blog post, I thought of very simple new puzzle. Let us see if we can try to solve it and learn a bit more about Sequence. Here is the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&#038;blog=668536&#038;post=18926&#038;subd=sqlauthority&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">Yesterday my friend Vinod Kumar wrote excellent blog post on <a href="http://blogs.extremeexperts.com/2012/05/24/sql-server-2012-using-sequence/" target="_blank">SQL Server 2012: Using SEQUENCE</a>. I personally enjoyed reading the content on this subject. While I was reading the blog post, I thought of very simple new puzzle. Let us see if we can try to solve it and learn a bit more about Sequence.</p>
<p style="text-align:justify;">Here is the script, which I executed.</p>
<p style="text-align:justify;"><code style="font-size:12px;"><span style="color:blue;">USE </span><span style="color:black;">TempDB<br />
GO<br />
</span><span style="color:green;">-- Create sequence<br />
</span><span style="color:blue;">CREATE </span><span style="color:black;">SEQUENCE dbo.SequenceID </span><span style="color:blue;">AS </span><span style="color:black;">BIGINT<br />
START </span><span style="color:blue;">WITH </span><span style="color:black;">3<br />
INCREMENT </span><span style="color:blue;">BY </span><span style="color:black;">1<br />
MINVALUE 1<br />
MAXVALUE 5<br />
CYCLE<br />
NO CACHE</span><span style="color:gray;">;<br />
</span><span style="color:black;">GO<br />
</span><span style="color:green;">-- Following will return 3<br />
</span><span style="color:blue;">SELECT </span><span style="color:black;">next value </span><span style="color:blue;">FOR </span><span style="color:black;">dbo.SequenceID</span><span style="color:gray;">;<br />
</span><span style="color:green;">-- Following will return 4<br />
</span><span style="color:blue;">SELECT </span><span style="color:black;">next value </span><span style="color:blue;">FOR </span><span style="color:black;">dbo.SequenceID</span><span style="color:gray;">;<br />
</span><span style="color:green;">-- Following will return 5<br />
</span><span style="color:blue;">SELECT </span><span style="color:black;">next value </span><span style="color:blue;">FOR </span><span style="color:black;">dbo.SequenceID</span><span style="color:gray;">;<br />
</span><span style="color:green;">-- Following will return which number<br />
</span><span style="color:blue;">SELECT </span><span style="color:black;">next value </span><span style="color:blue;">FOR </span><span style="color:black;">dbo.SequenceID</span><span style="color:gray;">;<br />
</span><span style="color:green;">-- Clean up<br />
</span><span style="color:blue;">DROP </span><span style="color:black;">SEQUENCE dbo.SequenceID</span><span style="color:gray;">;<br />
</span><span style="color:black;">GO</span></code></p>
<p style="text-align:justify;">Above script gave me following resultset.</p>
<p style="text-align:justify;"><img class="alignnone" src="http://www.pinaldave.com/bimg/seqpuz.jpg" alt="" width="481" height="371" /></p>
<p style="text-align:justify;">3 is the starting value and 5 is the maximum value. <em><strong>Once Sequence reaches to maximum value what happens? and WHY?</strong></em></p>
<p style="text-align:justify;"><em><strong></strong></em><br />
<strong>Bonus question:</strong> If you use UNION between 2 SELECT statement which uses UNION, it also throws an error. What is the reason behind it?</p>
<p style="text-align:justify;"><img class="alignnone" src="http://www.pinaldave.com/bimg/seqpuz2.jpg" alt="" width="421" height="188" /></p>
<p style="text-align:justify;">Can you attempt to answer this question without running this code in SQL Server 2012. I am very confident that irrespective of SQL Server version you are running you will have great learning. I will follow up of the answer in comments below.</p>
<p style="text-align:justify;">Reference: <strong>Pinal Dave (<a href="http://blog.sqlauthority.com/" target="_blank">http://blog.sqlauthority.com</a>)</strong></p>
<div></div>
<br />Filed under: <a href='http://blog.sqlauthority.com/category/technology/postaday/'>PostADay</a>, <a href='http://blog.sqlauthority.com/category/technology/sql/'>SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-authority/'>SQL Authority</a>, <a href='http://blog.sqlauthority.com/category/sql-puzzle/'>SQL Puzzle</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-query/'>SQL Query</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-server/'>SQL Server</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-tips-and-tricks/'>SQL Tips and Tricks</a>, <a href='http://blog.sqlauthority.com/category/technology/t-sql/'>T SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/'>Technology</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqlauthority.wordpress.com/18926/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqlauthority.wordpress.com/18926/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqlauthority.wordpress.com/18926/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqlauthority.wordpress.com/18926/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sqlauthority.wordpress.com/18926/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sqlauthority.wordpress.com/18926/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sqlauthority.wordpress.com/18926/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sqlauthority.wordpress.com/18926/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqlauthority.wordpress.com/18926/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqlauthority.wordpress.com/18926/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqlauthority.wordpress.com/18926/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqlauthority.wordpress.com/18926/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqlauthority.wordpress.com/18926/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqlauthority.wordpress.com/18926/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&#038;blog=668536&#038;post=18926&#038;subd=sqlauthority&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.sqlauthority.com/2012/05/25/sql-server-a-puzzle-fun-with-sequence-in-sql-server-2012-guess-the-next-value/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aa5a2264e8a27d802bb22ab6ccf688?s=96&#38;d=identicon" medium="image">
			<media:title type="html">pinaldave</media:title>
		</media:content>

		<media:content url="http://www.pinaldave.com/bimg/seqpuz.jpg" medium="image" />

		<media:content url="http://www.pinaldave.com/bimg/seqpuz2.jpg" medium="image" />
	</item>
		<item>
		<title>SQL SERVER &#8211; A Puzzle &#8211; Fun with NULL &#8211; Fix Error 8117</title>
		<link>http://blog.sqlauthority.com/2012/05/24/sql-server-a-puzzle-fun-with-null-fix-error-8117/</link>
		<comments>http://blog.sqlauthority.com/2012/05/24/sql-server-a-puzzle-fun-with-null-fix-error-8117/#comments</comments>
		<pubDate>Thu, 24 May 2012 01:30:54 +0000</pubDate>
		<dc:creator>pinaldave</dc:creator>
				<category><![CDATA[PostADay]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Authority]]></category>
		<category><![CDATA[SQL Puzzle]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Scripts]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[T SQL]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=18912</guid>
		<description><![CDATA[During my 8 years of career, I have been involved in many interviews. Quite often, I act as the  interview. If I am the interviewer, I ask many questions &#8211; from easy questions to difficult ones. When I am the interviewee, I frequently get an opportunity to ask the interviewer some questions back. Regardless of the my [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&#038;blog=668536&#038;post=18912&#038;subd=sqlauthority&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">During my 8 years of career, I have been involved in many interviews. Quite often, I act as the  interview. If I am the interviewer, I ask many questions &#8211; from easy questions to difficult ones. When I am the interviewee, I frequently get an opportunity to ask the interviewer some questions back. Regardless of the my capacity in attending the interview, I always make it a point to ask the interviewer at least one question.</p>
<h3 style="text-align:justify;"><strong>What is NULL?</strong></h3>
<p style="text-align:justify;">It’s always fun to ask this question during interviews, because in every interview, I get a different answer. NULL is often confused with false, absence of value or infinite value. Honestly, NULL is a very interesting subject as it bases its behavior in server settings. There are a few properties of NULL that are universal, but the knowledge about these properties is not known in a universal sense.</p>
<p style="text-align:justify;">Let us run this simple puzzle. Run the following T-SQL script:</p>
<p style="text-align:justify;"><code style="font-size:12px;"><span style="color:blue;">SELECT </span><span style="color:magenta;">SUM</span><span style="color:gray;">(</span><span style="color:black;">data</span><span style="color:gray;">)<br />
</span><span style="color:blue;">FROM </span><span style="color:gray;">(</span><span style="color:blue;">SELECT </span><span style="color:gray;">NULL </span><span style="color:blue;">AS </span><span style="color:black;">data</span><span style="color:gray;">) </span><span style="color:black;">t<br />
</span></code></p>
<p style="text-align:justify;">It will return the following error:</p>
<p style="text-align:justify;"><span style="color:#ff0000;">Msg 8117, Level 16, State 1, Line 1</span><br />
<span style="color:#ff0000;"> Operand data type NULL is invalid for sum operator.</span></p>
<p style="text-align:justify;"><img class="alignnone" src="http://www.pinaldave.com/bimg/8117error.jpg" alt="" width="427" height="154" /></p>
<p style="text-align:justify;">Now the error makes it very clear that NULL is invalid for sum Operator. Frequently enough, I have showed this simple query to many folks whom I came across. I asked them if they could modify the subquery and return the result as NULL. Here is what I expected:</p>
<p style="text-align:justify;"><img class="alignnone" src="http://www.pinaldave.com/bimg/8117error1.jpg" alt="" width="457" height="177" /></p>
<p style="text-align:justify;">Even though this is a very simple looking query, so far I’ve got the correct answer from only 10% of the people to whom I have asked this question. It was common for me to receive this kind of answer – convert the NULL to some data type. However, doing so usually returns the value as 0 or the integer they passed.</p>
<p style="text-align:justify;"><code style="font-size:12px;"><span style="color:blue;">SELECT </span><span style="color:magenta;">SUM</span><span style="color:gray;">(</span><span style="color:black;">data</span><span style="color:gray;">)<br />
</span><span style="color:blue;">FROM </span><span style="color:gray;">(</span><span style="color:blue;">SELECT </span><span style="color:magenta;">ISNULL</span><span style="color:gray;">(NULL,</span><span style="color:black;">0</span><span style="color:gray;">) </span><span style="color:blue;">AS </span><span style="color:black;">data</span><span style="color:gray;">) </span><span style="color:black;">t</span></code></p>
<p style="text-align:justify;"><img class="alignnone" src="http://www.pinaldave.com/bimg/8117error2.jpg" alt="" width="436" height="173" /></p>
<p style="text-align:justify;">I usually see many people modifying the outer query to get desired NULL result, but that is not allowed in this simple puzzle. This small puzzle made me wonder how many people have a clear understanding about NULL.</p>
<p style="text-align:justify;">Well, here is the answer to my simple puzzle. Just CAST NULL AS INT and it will return the final result as NULL:</p>
<p style="text-align:justify;"><code style="font-size:12px;"><span style="color:blue;">SELECT </span><span style="color:magenta;">SUM</span><span style="color:gray;">(</span><span style="color:black;">data</span><span style="color:gray;">)<br />
</span><span style="color:blue;">FROM </span><span style="color:gray;">(</span><span style="color:blue;">SELECT </span><span style="color:magenta;">CAST</span><span style="color:gray;">(NULL </span><span style="color:blue;">AS INT</span><span style="color:gray;">) </span><span style="color:blue;">AS </span><span style="color:black;">data</span><span style="color:gray;">) </span><span style="color:black;">t<br />
</span></code></p>
<p style="text-align:justify;"><img class="alignnone" src="http://www.pinaldave.com/bimg/8117error3.jpg" alt="" width="460" height="166" /></p>
<p style="text-align:justify;">Now that you know the answer, don&#8217;t you think it was very simple indeed? This blog post is especially dedicated to my friend <strong>Madhivanan</strong> who has written an excellent blog post about NULL. I am confident that after reading the blog post from Madhivanan, you will have no confusion regarding NULL in the future. Read: <a href="http://beyondrelational.com/modules/2/blogs/70/posts/14865/null-null-null-and-nothing-but-null.aspx" target="_blank"><strong>NULL, NULL, NULL and nothing but NULL</strong></a>.</p>
<p style="text-align:justify;">Reference: <strong>Pinal Dave (<a href="http://blog.sqlauthority.com/" target="_blank">http://blog.sqlauthority.com</a>)</strong></p>
<div></div>
<div></div>
<br />Filed under: <a href='http://blog.sqlauthority.com/category/technology/postaday/'>PostADay</a>, <a href='http://blog.sqlauthority.com/category/technology/sql/'>SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-authority/'>SQL Authority</a>, <a href='http://blog.sqlauthority.com/category/sql-puzzle/'>SQL Puzzle</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-query/'>SQL Query</a>, <a href='http://blog.sqlauthority.com/category/sql-scripts/'>SQL Scripts</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-server/'>SQL Server</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-tips-and-tricks/'>SQL Tips and Tricks</a>, <a href='http://blog.sqlauthority.com/category/technology/t-sql/'>T SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/'>Technology</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqlauthority.wordpress.com/18912/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqlauthority.wordpress.com/18912/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqlauthority.wordpress.com/18912/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqlauthority.wordpress.com/18912/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sqlauthority.wordpress.com/18912/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sqlauthority.wordpress.com/18912/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sqlauthority.wordpress.com/18912/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sqlauthority.wordpress.com/18912/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqlauthority.wordpress.com/18912/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqlauthority.wordpress.com/18912/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqlauthority.wordpress.com/18912/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqlauthority.wordpress.com/18912/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqlauthority.wordpress.com/18912/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqlauthority.wordpress.com/18912/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&#038;blog=668536&#038;post=18912&#038;subd=sqlauthority&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.sqlauthority.com/2012/05/24/sql-server-a-puzzle-fun-with-null-fix-error-8117/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aa5a2264e8a27d802bb22ab6ccf688?s=96&#38;d=identicon" medium="image">
			<media:title type="html">pinaldave</media:title>
		</media:content>

		<media:content url="http://www.pinaldave.com/bimg/8117error.jpg" medium="image" />

		<media:content url="http://www.pinaldave.com/bimg/8117error1.jpg" medium="image" />

		<media:content url="http://www.pinaldave.com/bimg/8117error2.jpg" medium="image" />

		<media:content url="http://www.pinaldave.com/bimg/8117error3.jpg" medium="image" />
	</item>
		<item>
		<title>SQL SERVER &#8211; Standard Reports from SQL Server Management Studio &#8211; SQL in Sixty Seconds #016 &#8211; Video</title>
		<link>http://blog.sqlauthority.com/2012/05/23/sql-server-standard-reports-from-sql-server-management-studio-sql-in-sixty-seconds-016-video/</link>
		<comments>http://blog.sqlauthority.com/2012/05/23/sql-server-standard-reports-from-sql-server-management-studio-sql-in-sixty-seconds-016-video/#comments</comments>
		<pubDate>Wed, 23 May 2012 01:30:34 +0000</pubDate>
		<dc:creator>pinaldave</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[Pinal Dave]]></category>
		<category><![CDATA[PostADay]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Authority]]></category>
		<category><![CDATA[SQL in Sixty Seconds]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Scripts]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Server Management Studio]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[T SQL]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Video]]></category>

		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=18893</guid>
		<description><![CDATA[SQL Server management Studio 2012 is wonderful tool and has many different features. Many times, an average user does not use them as they are not aware about these features. Today, we will learn one such feature. SSMS comes with many inbuilt performance and activity reports, but we do not use it to the full [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&#038;blog=668536&#038;post=18893&#038;subd=sqlauthority&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;"><img class="alignleft" src="http://www.pinaldave.com/bimg/60.jpg" alt="" width="153" height="108" /></p>
<p style="text-align:justify;">SQL Server management Studio 2012 is wonderful tool and has many different features. Many times, an average user does not use them as they are not aware about these features. Today, we will learn one such feature. SSMS comes with many inbuilt performance and activity reports, but we do not use it to the full potential.</p>
<p style="text-align:justify;"><strong><em>Connect to SQL Server Node &gt;&gt; Right Click on it &gt;&gt; Go to Reports &gt;&gt; Click on Standard Reports &gt;&gt; Pick Any Report.</em></strong></p>
<p style="text-align:justify;"><span class='embed-youtube' style='text-align:center; display: block;'><iframe class='youtube-player' type='text/html' width='500' height='312' src='http://www.youtube.com/embed/ORtv29rxXJI?version=3&#038;rel=1&#038;fs=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;wmode=transparent' frameborder='0'></iframe></span></p>
<p style="text-align:justify;">Please note that some of the reports can be IO intensive and not suggested to run during business hours!</p>
<p style="text-align:justify;"><strong>More on Standard Reports:<br />
</strong><strong></strong></p>
<p style="text-align:justify;"><strong><a href="http://blog.sqlauthority.com/2010/03/25/sql-server-default-activty-and-performance-reports-from-sssms/" target="_blank">SQL SERVER – Out of the Box – Activity and Performance Reports from SSSMS</a></strong><br />
<strong><a href="http://blog.sqlauthority.com/2010/03/26/sql-server-generate-report-for-index-physical-statistics-ssms/" target="_blank">SQL SERVER – Generate Report for Index Physical Statistics – SSMS<br />
</a><a href="http://blog.sqlauthority.com/2010/04/13/sql-server-configure-management-data-collection-in-quick-steps-t-sql-tuesday-005" target="_blank">SQL SERVER – Configure Management Data Collection in Quick Steps</a></strong></p>
<p style="text-align:justify;"><span style="text-align:justify;">I encourage you to submit your ideas for </span><strong><em>SQL in Sixty Seconds</em></strong><span style="text-align:justify;">. We will try to accommodate as many as we can.</span></p>
<p style="text-align:justify;">If we like your idea we promise to share with you educational material.</p>
<p style="text-align:justify;">Reference: <strong>Pinal Dave (<a href="http://blog.sqlauthority.com/" target="_blank">http://blog.sqlauthority.com</a>)</strong></p>
<div></div>
<div></div>
<br />Filed under: <a href='http://blog.sqlauthority.com/category/database/'>Database</a>, <a href='http://blog.sqlauthority.com/category/pinal-dave/'>Pinal Dave</a>, <a href='http://blog.sqlauthority.com/category/technology/postaday/'>PostADay</a>, <a href='http://blog.sqlauthority.com/category/technology/sql/'>SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-authority/'>SQL Authority</a>, <a href='http://blog.sqlauthority.com/category/sql-in-sixty-seconds/'>SQL in Sixty Seconds</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-query/'>SQL Query</a>, <a href='http://blog.sqlauthority.com/category/sql-scripts/'>SQL Scripts</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-server/'>SQL Server</a>, <a href='http://blog.sqlauthority.com/category/sql-server-management-studio/'>SQL Server Management Studio</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-tips-and-tricks/'>SQL Tips and Tricks</a>, <a href='http://blog.sqlauthority.com/category/technology/t-sql/'>T SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/'>Technology</a>, <a href='http://blog.sqlauthority.com/category/video/'>Video</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqlauthority.wordpress.com/18893/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqlauthority.wordpress.com/18893/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqlauthority.wordpress.com/18893/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqlauthority.wordpress.com/18893/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sqlauthority.wordpress.com/18893/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sqlauthority.wordpress.com/18893/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sqlauthority.wordpress.com/18893/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sqlauthority.wordpress.com/18893/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqlauthority.wordpress.com/18893/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqlauthority.wordpress.com/18893/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqlauthority.wordpress.com/18893/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqlauthority.wordpress.com/18893/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqlauthority.wordpress.com/18893/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqlauthority.wordpress.com/18893/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&#038;blog=668536&#038;post=18893&#038;subd=sqlauthority&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.sqlauthority.com/2012/05/23/sql-server-standard-reports-from-sql-server-management-studio-sql-in-sixty-seconds-016-video/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aa5a2264e8a27d802bb22ab6ccf688?s=96&#38;d=identicon" medium="image">
			<media:title type="html">pinaldave</media:title>
		</media:content>

		<media:content url="http://www.pinaldave.com/bimg/60.jpg" medium="image" />
	</item>
		<item>
		<title>SQL SERVER &#8211; SmallDateTime and Precision &#8211; A Continuous Confusion</title>
		<link>http://blog.sqlauthority.com/2012/05/22/sql-server-smalldatetime-and-precision-a-continuous-confusion/</link>
		<comments>http://blog.sqlauthority.com/2012/05/22/sql-server-smalldatetime-and-precision-a-continuous-confusion/#comments</comments>
		<pubDate>Tue, 22 May 2012 01:30:33 +0000</pubDate>
		<dc:creator>pinaldave</dc:creator>
				<category><![CDATA[CodeProject]]></category>
		<category><![CDATA[Developer Training]]></category>
		<category><![CDATA[PostADay]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Authority]]></category>
		<category><![CDATA[SQL DateTime]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[SQLServer]]></category>
		<category><![CDATA[T SQL]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=18864</guid>
		<description><![CDATA[Some kinds of confusion never go away. Here is one of the ancient confusing things in SQL. The precision of the SmallDateTime is one concept that confuses a lot of people, proven by the many messages I receive everyday relating to this subject. Let me start with the question: What is the precision of the SMALLDATETIME datatypes? [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&#038;blog=668536&#038;post=18864&#038;subd=sqlauthority&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">Some kinds of confusion never go away. Here is one of the ancient confusing things in SQL. The precision of the SmallDateTime is one concept that confuses a lot of people, proven by the many messages I receive everyday relating to this subject.</p>
<p style="text-align:justify;">Let me start with the question: <strong><em>What is the precision of the SMALLDATETIME datatypes?</em></strong></p>
<p style="text-align:justify;">What is your answer? Write it down on your notepad.</p>
<p style="text-align:justify;">Now if you do not want to continue reading the blog post, head to my previous blog post over here: <a href="http://blog.sqlauthority.com/2010/06/01/sql-server-precision-of-smalldatetime-a-1-minute-precision/" target="_blank"><strong>SQL SERVER – Precision of SMALLDATETIME</strong></a>.</p>
<h3 style="text-align:justify;">A Social Media Question</h3>
<p style="text-align:justify;">Since the increase of social media conversations, I noticed that the amount of the comments I receive on this blog is a bit staggering. I receive lots of questions on <strong><a href="http://facebook.com/SQLAuth" target="_blank">facebook</a></strong>, <a href="http://twitter.com/pinaldave" target="_blank"><strong>twitter</strong></a> or <a href="https://plus.google.com/104990425207662620918/" target="_blank"><strong>Google+</strong></a>. One of the very interesting questions yesterday was asked on Facebook by <strong><a href="http://www.facebook.com/SQLAuth/posts/313545408724259" target="_blank">Raghavendra</a></strong>. I am re-organizing his script and asking all of the questions he has asked me. Let us see if we could help him with his question:</p>
<p style="text-align:justify;"><code style="font-size:12px;"><span style="color:blue;">CREATE TABLE </span><span style="color:#434343;">#temp<br />
</span><span style="color:gray;">(</span><span style="color:black;">name </span><span style="color:blue;">VARCHAR</span><span style="color:gray;">(</span><span style="color:black;">100</span><span style="color:gray;">),</span><span style="color:black;">registered smalldatetime</span><span style="color:gray;">)<br />
</span><span style="color:black;">GO<br />
</span><span style="color:blue;">DECLARE </span><span style="color:#434343;">@test </span><span style="color:black;">smalldatetime<br />
</span><span style="color:blue;">SET </span><span style="color:#434343;">@test</span><span style="color:blue;">=</span><span style="color:magenta;">GETDATE</span><span style="color:gray;">()<br />
</span><span style="color:blue;">INSERT INTO </span><span style="color:#434343;">#temp<br />
</span><span style="color:blue;">VALUES </span><span style="color:gray;">(</span><span style="color:red;">'Value1'</span><span style="color:gray;">,</span><span style="color:#434343;">@test</span><span style="color:gray;">)<br />
</span><span style="color:blue;">INSERT INTO </span><span style="color:#434343;">#temp<br />
</span><span style="color:blue;">VALUES </span><span style="color:gray;">(</span><span style="color:red;">'Value2'</span><span style="color:gray;">,</span><span style="color:#434343;">@test</span><span style="color:gray;">)<br />
</span><span style="color:black;">GO<br />
</span><span style="color:blue;">SELECT </span><span style="color:gray;">*<br />
</span><span style="color:blue;">FROM </span><span style="color:#434343;">#temp<br />
</span><span style="color:blue;">ORDER BY </span><span style="color:black;">registered </span><span style="color:blue;">DESC<br />
</span><span style="color:black;">GO<br />
</span><span style="color:blue;">DROP TABLE </span><span style="color:#434343;">#temp<br />
</span><span style="color:black;">GO</span></code></p>
<p style="text-align:justify;">Now when the above script is ran, we will get the following result:</p>
<p style="text-align:justify;"><img class="alignnone" src="http://www.pinaldave.com/bimg/smalldt1.jpg" alt="" width="277" height="82" /></p>
<p style="text-align:justify;">Well, the expectation of the query was to have the following result. The row which was inserted last was expected to return as first row in result set as the ORDER BY descending.</p>
<p style="text-align:justify;"><img class="alignnone" src="http://www.pinaldave.com/bimg/smalldt2.jpg" alt="" width="284" height="83" /></p>
<p style="text-align:justify;"><strong>Side note:</strong> Because the requirement is to get the latest data, we can&#8217;t use any  column other than smalldatetime column in order by. If we use name column in the order by, we will get an incorrect result as it can be any name.</p>
<h3 style="text-align:justify;">My Initial Reaction</h3>
<p style="text-align:justify;">My initial reaction was as follows:</p>
<p style="text-align:justify;"><strong>1) DataType DateTime2:</strong> If file precision of the column is expected from the column which store date and time, it should not be smalldatetime. The precision of the column smalldatetime is One Minute (Read Here) for finer precision use DateTime or DateTime2 data type.</p>
<p style="text-align:justify;">Here is the code which includes above suggestion:</p>
<p style="text-align:justify;"><code style="font-size:12px;"><span style="color:blue;">CREATE TABLE </span><span style="color:#434343;">#temp<br />
</span><span style="color:gray;">(</span><span style="color:black;">name </span><span style="color:blue;">VARCHAR</span><span style="color:gray;">(</span><span style="color:black;">100</span><span style="color:gray;">), </span><span style="color:black;">registered datetime2</span><span style="color:gray;">)<br />
</span><span style="color:black;">GO<br />
</span><span style="color:blue;">DECLARE </span><span style="color:#434343;">@test </span><span style="color:black;">datetime2<br />
</span><span style="color:blue;">SET </span><span style="color:#434343;">@test</span><span style="color:blue;">=</span><span style="color:magenta;">GETDATE</span><span style="color:gray;">()<br />
</span><span style="color:blue;">INSERT INTO </span><span style="color:#434343;">#temp<br />
</span><span style="color:blue;">VALUES </span><span style="color:gray;">(</span><span style="color:red;">'Value1'</span><span style="color:gray;">,</span><span style="color:#434343;">@test</span><span style="color:gray;">)<br />
</span><span style="color:blue;">INSERT INTO </span><span style="color:#434343;">#temp<br />
</span><span style="color:blue;">VALUES </span><span style="color:gray;">(</span><span style="color:red;">'Value2'</span><span style="color:gray;">,</span><span style="color:#434343;">@test</span><span style="color:gray;">)<br />
</span><span style="color:black;">GO<br />
</span><span style="color:blue;">SELECT </span><span style="color:gray;">*<br />
</span><span style="color:blue;">FROM </span><span style="color:#434343;">#temp<br />
</span><span style="color:blue;">ORDER BY </span><span style="color:black;">registered </span><span style="color:blue;">DESC<br />
</span><span style="color:black;">GO<br />
</span><span style="color:blue;">DROP TABLE </span><span style="color:#434343;">#temp<br />
</span><span style="color:black;">GO</span></code></p>
<p style="text-align:justify;"><strong>2) Tie Breaker Identity:</strong> There are always possibilities that two rows were inserted at the same time. In that case, you may need a tie breaker. If you have an increasing identity column, you can use that as a tie breaker as well.</p>
<p style="text-align:justify;"><strong><br />
</strong></p>
<p style="text-align:justify;"><code style="font-size:12px;"><span style="color:blue;">CREATE TABLE </span><span style="color:#434343;">#temp<br />
</span><span style="color:gray;">(</span><span style="color:black;">ID </span><span style="color:blue;">INT </span><span style="color:#434343;">IDENTITY</span><span style="color:gray;">(</span><span style="color:black;">1</span><span style="color:gray;">,</span><span style="color:black;">1</span><span style="color:gray;">), </span><span style="color:black;">name </span><span style="color:blue;">VARCHAR</span><span style="color:gray;">(</span><span style="color:black;">100</span><span style="color:gray;">),</span><span style="color:black;">registered datetime2</span><span style="color:gray;">)<br />
</span><span style="color:black;">GO<br />
</span><span style="color:blue;">DECLARE </span><span style="color:#434343;">@test </span><span style="color:black;">datetime2<br />
</span><span style="color:blue;">SET </span><span style="color:#434343;">@test</span><span style="color:blue;">=</span><span style="color:magenta;">GETDATE</span><span style="color:gray;">()<br />
</span><span style="color:blue;">INSERT INTO </span><span style="color:#434343;">#temp<br />
</span><span style="color:blue;">VALUES </span><span style="color:gray;">(</span><span style="color:red;">'Value1'</span><span style="color:gray;">,</span><span style="color:#434343;">@test</span><span style="color:gray;">)<br />
</span><span style="color:blue;">INSERT INTO </span><span style="color:#434343;">#temp<br />
</span><span style="color:blue;">VALUES </span><span style="color:gray;">(</span><span style="color:red;">'Value2'</span><span style="color:gray;">,</span><span style="color:#434343;">@test</span><span style="color:gray;">)<br />
</span><span style="color:black;">GO<br />
</span><span style="color:blue;">SELECT </span><span style="color:gray;">*<br />
</span><span style="color:blue;">FROM </span><span style="color:#434343;">#temp<br />
</span><span style="color:blue;">ORDER BY </span><span style="color:black;">ID </span><span style="color:blue;">DESC<br />
</span><span style="color:black;">GO<br />
</span><span style="color:blue;">DROP TABLE </span><span style="color:#434343;">#temp<br />
</span><span style="color:black;">GO</span></code></p>
<p style="text-align:justify;">Those two were the quick suggestions I provided. It is not necessary that you should use both advices. It is possible that one can use only DATETIME datatype or Identity column can have datatype of BIGINT or have another tie breaker.</p>
<h3 style="text-align:justify;">An Alternate <span style="color:#ff0000;">NO</span> Solution</h3>
<p style="text-align:justify;">In the<strong> <a href="http://www.facebook.com/SQLAuth/posts/313545408724259" target="_blank">facebook thread</a></strong> this was also discussed as one of the solutions:</p>
<p style="text-align:justify;"><code style="font-size:12px;"><span style="color:blue;">CREATE TABLE </span><span style="color:#434343;">#temp<br />
</span><span style="color:gray;">(</span><span style="color:black;">name </span><span style="color:blue;">VARCHAR</span><span style="color:gray;">(</span><span style="color:black;">100</span><span style="color:gray;">),</span><span style="color:black;">registered smalldatetime</span><span style="color:gray;">)<br />
</span><span style="color:black;">GO<br />
</span><span style="color:blue;">DECLARE </span><span style="color:#434343;">@test </span><span style="color:black;">smalldatetime<br />
</span><span style="color:blue;">SET </span><span style="color:#434343;">@test</span><span style="color:blue;">=</span><span style="color:magenta;">GETDATE</span><span style="color:gray;">()<br />
</span><span style="color:blue;">INSERT INTO </span><span style="color:#434343;">#temp<br />
</span><span style="color:blue;">VALUES </span><span style="color:gray;">(</span><span style="color:red;">'Value1'</span><span style="color:gray;">,</span><span style="color:#434343;">@test</span><span style="color:gray;">)<br />
</span><span style="color:blue;">INSERT INTO </span><span style="color:#434343;">#temp<br />
</span><span style="color:blue;">VALUES </span><span style="color:gray;">(</span><span style="color:red;">'Value2'</span><span style="color:gray;">,</span><span style="color:#434343;">@test</span><span style="color:gray;">)<br />
</span><span style="color:black;">GO<br />
</span><span style="color:blue;">SELECT </span><span style="color:black;">name</span><span style="color:gray;">, </span><span style="color:black;">registered</span><span style="color:gray;">,<br />
</span><span style="color:black;">ROW_NUMBER</span><span style="color:gray;">() </span><span style="color:blue;">OVER</span><span style="color:gray;">(</span><span style="color:blue;">ORDER BY </span><span style="color:black;">registered </span><span style="color:blue;">DESC</span><span style="color:gray;">) </span><span style="color:blue;">AS </span><span style="color:black;">"Row Number"<br />
</span><span style="color:blue;">FROM </span><span style="color:#434343;">#temp </span><span style="color:blue;">ORDER BY </span><span style="color:black;">3 </span><span style="color:blue;">DESC<br />
</span><span style="color:black;">GO<br />
</span><span style="color:blue;">DROP TABLE </span><span style="color:#434343;">#temp<br />
</span><span style="color:black;">GO</span></code></p>
<p style="text-align:justify;">However, I believe it is not the solution and can be further misleading if used in a production server. Here is the example of why it is not a good solution:</p>
<p style="text-align:justify;"><code style="font-size:12px;"><span style="color:blue;">CREATE TABLE </span><span style="color:#434343;">#temp<br />
</span><span style="color:gray;">(</span><span style="color:black;">name </span><span style="color:blue;">VARCHAR</span><span style="color:gray;">(</span><span style="color:black;">100</span><span style="color:gray;">) NOT NULL,</span><span style="color:black;">registered smalldatetime</span><span style="color:gray;">)<br />
</span><span style="color:black;">GO<br />
</span><span style="color:blue;">DECLARE </span><span style="color:#434343;">@test </span><span style="color:black;">smalldatetime<br />
</span><span style="color:blue;">SET </span><span style="color:#434343;">@test</span><span style="color:blue;">=</span><span style="color:magenta;">GETDATE</span><span style="color:gray;">()<br />
</span><span style="color:blue;">INSERT INTO </span><span style="color:#434343;">#temp<br />
</span><span style="color:blue;">VALUES </span><span style="color:gray;">(</span><span style="color:red;">'Value1'</span><span style="color:gray;">,</span><span style="color:#434343;">@test</span><span style="color:gray;">)<br />
</span><span style="color:blue;">INSERT INTO </span><span style="color:#434343;">#temp<br />
</span><span style="color:blue;">VALUES </span><span style="color:gray;">(</span><span style="color:red;">'Value2'</span><span style="color:gray;">,</span><span style="color:#434343;">@test</span><span style="color:gray;">)<br />
</span><span style="color:black;">GO<br />
</span><span style="color:green;">-- Before Index<br />
</span><span style="color:blue;">SELECT </span><span style="color:black;">name</span><span style="color:gray;">, </span><span style="color:black;">registered</span><span style="color:gray;">,<br />
</span><span style="color:black;">ROW_NUMBER</span><span style="color:gray;">() </span><span style="color:blue;">OVER</span><span style="color:gray;">(</span><span style="color:blue;">ORDER BY </span><span style="color:black;">registered </span><span style="color:blue;">DESC</span><span style="color:gray;">) </span><span style="color:blue;">AS </span><span style="color:black;">"Row Number"<br />
</span><span style="color:blue;">FROM </span><span style="color:#434343;">#temp </span><span style="color:blue;">ORDER BY </span><span style="color:black;">3 </span><span style="color:blue;">DESC<br />
</span><span style="color:black;">GO<br />
</span><span style="color:green;">-- Create Index<br />
</span><span style="color:blue;">ALTER TABLE </span><span style="color:#434343;">#temp<br />
</span><span style="color:blue;">ADD CONSTRAINT </span><span style="color:black;">[PK_#temp] </span><span style="color:blue;">PRIMARY KEY CLUSTERED<br />
</span><span style="color:gray;">(</span><span style="color:black;">name </span><span style="color:blue;">DESC</span><span style="color:gray;">)<br />
</span><span style="color:black;">GO<br />
</span><span style="color:green;">-- After Index<br />
</span><span style="color:blue;">SELECT </span><span style="color:black;">name</span><span style="color:gray;">, </span><span style="color:black;">registered</span><span style="color:gray;">,<br />
</span><span style="color:black;">ROW_NUMBER</span><span style="color:gray;">() </span><span style="color:blue;">OVER</span><span style="color:gray;">(</span><span style="color:blue;">ORDER BY </span><span style="color:black;">registered </span><span style="color:blue;">DESC</span><span style="color:gray;">) </span><span style="color:blue;">AS </span><span style="color:black;">"Row Number"<br />
</span><span style="color:blue;">FROM </span><span style="color:#434343;">#temp </span><span style="color:blue;">ORDER BY </span><span style="color:black;">3 </span><span style="color:blue;">DESC<br />
</span><span style="color:black;">GO<br />
</span><span style="color:blue;">DROP TABLE </span><span style="color:#434343;">#temp<br />
</span><span style="color:black;">GO<br />
</span></code></p>
<p style="text-align:justify;"><img class="alignnone" src="http://www.pinaldave.com/bimg/smalldt3.jpg" alt="" width="373" height="247" /></p>
<p style="text-align:justify;">Now let us examine the resultset. You will notice that an index which is created on the base table which is (indeed) schema change the table but can affect the resultset. As you can see, an index can change the resultset, so this method is not yet perfect to get the latest inserted resultset.</p>
<h3 style="text-align:justify;">No Schema Change Requirement</h3>
<p style="text-align:justify;">After giving these two suggestions, I was waiting for the feedback of the asker. However, the requirement of the asker was there can&#8217;t be any schema change because the application was used by many other applications. I validated again, and of course, the requirement is no schema change at all. No addition of the column of change of datatypes of any other columns. There is no further help as well.</p>
<p style="text-align:justify;">This is indeed an interesting question. I personally can&#8217;t think of any solution which I could provide him given the requirement of no schema change. Can you think of any other solution to this?</p>
<h3 style="text-align:justify;">Need of Database Designer</h3>
<p style="text-align:justify;">This question once again brings up another ancient question:  “Do we need a database designer?” I often come across databases which are facing major performance problems or have redundant data. Normalization is often ignored when a database is built fast under a very tight deadline. Often I come across a database which has table with unnecessary columns and performance problems. While working as Developer Lead in my earlier jobs, I have seen developers adding columns to tables without anybody’s consent and retrieving them as SELECT *.  There is a lot to discuss on this subject in detail, but for now, let’s discuss the question first. Do you have any suggestions for the above question?</p>
<p style="text-align:justify;">Reference: <strong></strong><strong>Pinal Dave (<a href="http://blog.sqlauthority.com/" target="_blank">http://blog.sqlauthority.com</a>)</strong></p>
<br />Filed under: <a href='http://blog.sqlauthority.com/category/codeproject-2/'>CodeProject</a>, <a href='http://blog.sqlauthority.com/category/developer-training/'>Developer Training</a>, <a href='http://blog.sqlauthority.com/category/technology/postaday/'>PostADay</a>, <a href='http://blog.sqlauthority.com/category/technology/sql/'>SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-authority/'>SQL Authority</a>, <a href='http://blog.sqlauthority.com/category/sql-datetime/'>SQL DateTime</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-query/'>SQL Query</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-server/'>SQL Server</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-tips-and-tricks/'>SQL Tips and Tricks</a>, <a href='http://blog.sqlauthority.com/category/sqlserver/'>SQLServer</a>, <a href='http://blog.sqlauthority.com/category/technology/t-sql/'>T SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/'>Technology</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqlauthority.wordpress.com/18864/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqlauthority.wordpress.com/18864/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqlauthority.wordpress.com/18864/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqlauthority.wordpress.com/18864/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sqlauthority.wordpress.com/18864/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sqlauthority.wordpress.com/18864/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sqlauthority.wordpress.com/18864/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sqlauthority.wordpress.com/18864/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqlauthority.wordpress.com/18864/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqlauthority.wordpress.com/18864/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqlauthority.wordpress.com/18864/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqlauthority.wordpress.com/18864/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqlauthority.wordpress.com/18864/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqlauthority.wordpress.com/18864/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&#038;blog=668536&#038;post=18864&#038;subd=sqlauthority&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.sqlauthority.com/2012/05/22/sql-server-smalldatetime-and-precision-a-continuous-confusion/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aa5a2264e8a27d802bb22ab6ccf688?s=96&#38;d=identicon" medium="image">
			<media:title type="html">pinaldave</media:title>
		</media:content>

		<media:content url="http://www.pinaldave.com/bimg/smalldt1.jpg" medium="image" />

		<media:content url="http://www.pinaldave.com/bimg/smalldt2.jpg" medium="image" />

		<media:content url="http://www.pinaldave.com/bimg/smalldt3.jpg" medium="image" />
	</item>
		<item>
		<title>SQL SERVER &#8211; Renaming Index &#8211; Index Naming Conventions</title>
		<link>http://blog.sqlauthority.com/2012/05/21/sql-server-renaming-index-index-naming-conventions/</link>
		<comments>http://blog.sqlauthority.com/2012/05/21/sql-server-renaming-index-index-naming-conventions/#comments</comments>
		<pubDate>Mon, 21 May 2012 01:30:46 +0000</pubDate>
		<dc:creator>pinaldave</dc:creator>
				<category><![CDATA[PostADay]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Authority]]></category>
		<category><![CDATA[SQL Index]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[T SQL]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=18808</guid>
		<description><![CDATA[If you are regular reader of this blog, you must be aware of that there are two kinds of blog posts 1) I share what I learn recently 2) I share what I learn and request your participation. Today&#8217;s blog post is where I need your opinion to make this blog post a good reference [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&#038;blog=668536&#038;post=18808&#038;subd=sqlauthority&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;"><img class="alignleft" src="http://www.pinaldave.com/bimg/MyName.jpg" alt="" width="225" />If you are regular reader of this blog, you must be aware of that there are two kinds of blog posts 1) I share what I learn recently 2) I share what I learn and request your participation. Today&#8217;s blog post is where I need your opinion to make this blog post a good reference for future.</p>
<h3 style="text-align:justify;">Background Story</h3>
<p style="text-align:justify;">Recently I came across system where users have changed the name of the few of the table to match their new standard naming convention. The name of the table should be self explanatory and they should have explain their purpose without either opening it or reading documentations. Well, not every time this is possible but again this should be the goal of any database modeler. Well, I no way encourage the name of the tables to be too long like &#8216;ContainsDetailsofNewInvoices&#8217;. May be the name of the table should be &#8216;Invoices&#8217; and table should contain a column with New/Processed bit filed to indicate if the invoice is processed or not (if necessary). Coming back to original story, the database had several tables of which the name were changed.</p>
<h3 style="text-align:justify;">Story Continues&#8230;</h3>
<p style="text-align:justify;">To continue the story let me take simple example. There was a table with the name  &#8217;ReceivedInvoices&#8217;, it was changed to new name as &#8216;TblInvoices&#8217;. As per their new naming standard they had to prefix every talbe with the words &#8216;Tbl&#8217; and prefix every view with the letters &#8216;Vw&#8217;. Personally I do not see any need of the prefix but again, that issue is not here to discuss.  Now after changing the name of the table they faced very interesting situation. They had few indexes on the table which had name of the table. Let us take an example.</p>
<p style="text-align:justify;">Old Name of Table: <strong>ReceivedInvoice</strong><br />
Old Name of Index: <strong>Index_ReceivedInvoice1</strong></p>
<p style="text-align:justify;">Here is the new names</p>
<p style="text-align:justify;">New Name of Table: <strong>TblInvoices</strong><br />
New Name of Index: <strong>???</strong></p>
<p style="text-align:justify;">Well, their dilemma was what should be the new naming convention of the Indexes. Here is a quick proposal of the Index naming convention. Do let me know your opinion.</p>
<p style="text-align:left;"><em><strong>If Index is Primary Clustered Index: PK_TableName</strong></em><br />
<em><strong> If Index is  Non-clustered Index: IX_TableName_ColumnName1_ColumnName2&#8230;</strong></em><br />
<em><strong> If Index is Unique Non-clustered Index: UX_TableName_ColumnName1_ColumnName2&#8230;</strong></em><br />
<em><strong> If Index is Columnstore Non-clustered Index: CL_TableName</strong></em></p>
<p style="text-align:justify;">Here ColumnName is the column on which index is created. As there can be only one Primary Key Index and Columnstore Index per table, they do not require ColumnName in the name of the index. The purpose of this new naming convention is to increase readability. When any user come across this index, without opening their properties or definition, user can will know the details of the index.</p>
<h3 style="text-align:justify;">T-SQL script to Rename Indexes</h3>
<p style="text-align:justify;">Here is quick T-SQL script to rename Indexes</p>
<p><code style="font-size:12px;"><span style="color:blue;">EXEC </span><span style="color:darkred;">sp_rename </span><span style="color:red;">N'SchemaName.TableName.IndexName'</span><span style="color:gray;">, </span><span style="color:red;">N'New_IndexName'</span><span style="color:gray;">, </span><span style="color:red;">N'INDEX'</span><span style="color:gray;">;<br />
</span><span style="color:black;">GO</span></code></p>
<h3 style="text-align:justify;">Your Contribute Please</h3>
<p style="text-align:justify;">Well, the organization has already defined above four guidelines, personally I follow very similar guidelines too. I have seen many variations like adding prefixes CL for Clustered Index and NCL for Non-clustered Index. I have often seen many not using UX prefix for Unique Index but rather use generic IX prefix only.</p>
<p style="text-align:justify;">Now do you think if they have missed anything in the coding standard. Is NCI and CI prefixed required to additionally describe the index names. I have once received suggestion to even add fill factor in the index name &#8211; which I do not recommend at all.</p>
<p style="text-align:justify;"><strong>What do you think should be ideal name of the index, so it explains all the most important properties? </strong><em>Additionally, you are welcome to vote if you believe changing the name of index is just waste of time and energy. </em></p>
<p style="text-align:justify;">Note: The purpose of the blog post is to encourage all to participate with their ideas. I will write follow up blog posts in future compiling all the suggestions.</p>
<p style="text-align:justify;">Reference: <strong></strong><strong>Pinal Dave (<a href="http://blog.sqlauthority.com/" target="_blank">http://blog.sqlauthority.com</a>)</strong></p>
<div></div>
<br />Filed under: <a href='http://blog.sqlauthority.com/category/technology/postaday/'>PostADay</a>, <a href='http://blog.sqlauthority.com/category/technology/sql/'>SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-authority/'>SQL Authority</a>, <a href='http://blog.sqlauthority.com/category/sql-index/'>SQL Index</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-query/'>SQL Query</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-server/'>SQL Server</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-tips-and-tricks/'>SQL Tips and Tricks</a>, <a href='http://blog.sqlauthority.com/category/technology/t-sql/'>T SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/'>Technology</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqlauthority.wordpress.com/18808/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqlauthority.wordpress.com/18808/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqlauthority.wordpress.com/18808/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqlauthority.wordpress.com/18808/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sqlauthority.wordpress.com/18808/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sqlauthority.wordpress.com/18808/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sqlauthority.wordpress.com/18808/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sqlauthority.wordpress.com/18808/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqlauthority.wordpress.com/18808/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqlauthority.wordpress.com/18808/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqlauthority.wordpress.com/18808/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqlauthority.wordpress.com/18808/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqlauthority.wordpress.com/18808/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqlauthority.wordpress.com/18808/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&#038;blog=668536&#038;post=18808&#038;subd=sqlauthority&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.sqlauthority.com/2012/05/21/sql-server-renaming-index-index-naming-conventions/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aa5a2264e8a27d802bb22ab6ccf688?s=96&#38;d=identicon" medium="image">
			<media:title type="html">pinaldave</media:title>
		</media:content>

		<media:content url="http://www.pinaldave.com/bimg/MyName.jpg" medium="image" />
	</item>
		<item>
		<title>SQL SERVER &#8211; New Look for CodePlexProject &#8211; Hosting for Open Source Software</title>
		<link>http://blog.sqlauthority.com/2012/05/20/sql-server-new-look-for-codeplexproject-hosting-for-open-source-software/</link>
		<comments>http://blog.sqlauthority.com/2012/05/20/sql-server-new-look-for-codeplexproject-hosting-for-open-source-software/#comments</comments>
		<pubDate>Sun, 20 May 2012 01:30:35 +0000</pubDate>
		<dc:creator>pinaldave</dc:creator>
				<category><![CDATA[PostADay]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Authority]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[T SQL]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=18792</guid>
		<description><![CDATA[Codeplex is my favorite site. CodePlex is Microsoft&#8217;s free open source project hosting site. You can create projects to share with the world, collaborate with others on their projects, and download open source software. It is great place to find so many open source project available to explore. All the softwares are free and open source. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&#038;blog=668536&#038;post=18792&#038;subd=sqlauthority&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;"><img class="alignleft" src="http://www.pinaldave.com/bimg/codeplex1.jpg" alt="" width="250" height="125" />Codeplex is my favorite site. CodePlex is Microsoft&#8217;s free open source project hosting site. You can create projects to share with the world, collaborate with others on their projects, and download open source software. It is great place to find so many open source project available to explore. All the softwares are free and open source. I often go there at intervals to check what is new in SQL Server field as well on other technologies. Yesterday when I visited it, I had nice surprise as it has total makeover and looks very decent as well elegant at the same time.</p>
<p style="text-align:justify;">I have noticed that when I talk about Codeplex is user community, not everybody knows about it. The quickest way I explain what is codeplex is that I start naming few of the projects which are available there and suddenly I start noticing a few hands going up knowing the projects. This is indirect way to prove that many of us know CodePlex usability but do not pay special attention to what it is actually.</p>
<p style="text-align:justify;">Let me name a few popular projects of the CodePlex here.</p>
<ol style="text-align:justify;">
<li>SQL Server Sample Database [<a href="http://msftdbprodsamples.codeplex.com/" target="_blank">link</a>]</li>
<li>Image Resizer for Windows [<a href="http://imageresizer.codeplex.com/" target="_blank">link</a>]</li>
<li>Ajax Control Toolkit [<a href="http://ajaxcontroltoolkit.codeplex.com/" target="_blank">link</a>]</li>
<li>Skype Voice Changer [<a href="http://skypefx.codeplex.com/" target="_blank">link</a>]</li>
<li>Silverlight Toolkit [<a href="http://silverlight.codeplex.com/" target="_blank">link</a>]</li>
<li>Windows 7 USB/DBD Download Tool [<a href="http://wudt.codeplex.com/" target="_blank">link</a>]</li>
<li>Orchard Project [<a href="http://orchard.codeplex.com/" target="_blank">link</a>]</li>
</ol>
<p style="text-align:justify;">There are very interesting SQL Server projects available on Codeplex as well. I am listing few of them here for reference in listed in no particular order.</p>
<ol style="text-align:justify;">
<li>SQL Server Sample Database [<a href="http://msftdbprodsamples.codeplex.com/" target="_blank">link</a>]</li>
<li>SQL Server Compact ToolBox [<a href="http://sqlcetoolbox.codeplex.com/" target="_blank">link</a>]</li>
<li>Microsoft Drivers for PHP for SQL Server [<a href="http://sqlsrvphp.codeplex.com/" target="_blank">link</a>]</li>
<li>Internals Viewer for SQL Server [<a href="http://internalsviewer.codeplex.com/" target="_blank">link</a>]</li>
<li>SQL Server Spatial Tooks [<a href="http://sqlspatialtools.codeplex.com/" target="_blank">link</a>]</li>
<li>SQL Monitor &#8211; managing sql server performance [<a href="http://sqlmon.codeplex.com/" target="_blank">link</a>]</li>
<li><strong>SQL Server 2008 Extended Events SSMS Addin [<a href="http://extendedeventmanager.codeplex.com/" target="_blank">link</a>]</strong></li>
</ol>
<div style="text-align:justify;">How many of above mentioned project have you come across earlier? Leave a comment it will be interesting to know what our community is familiar with.</div>
<p style="text-align:justify;"><strong>Reference: </strong><strong></strong><strong>Pinal Dave (<a href="http://blog.sqlauthority.com/" target="_blank">http://blog.sqlauthority.com</a>)</strong></p>
<div></div>
<div></div>
<br />Filed under: <a href='http://blog.sqlauthority.com/category/technology/postaday/'>PostADay</a>, <a href='http://blog.sqlauthority.com/category/technology/sql/'>SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-authority/'>SQL Authority</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-query/'>SQL Query</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-server/'>SQL Server</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-tips-and-tricks/'>SQL Tips and Tricks</a>, <a href='http://blog.sqlauthority.com/category/technology/t-sql/'>T SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/'>Technology</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqlauthority.wordpress.com/18792/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqlauthority.wordpress.com/18792/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqlauthority.wordpress.com/18792/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqlauthority.wordpress.com/18792/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sqlauthority.wordpress.com/18792/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sqlauthority.wordpress.com/18792/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sqlauthority.wordpress.com/18792/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sqlauthority.wordpress.com/18792/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqlauthority.wordpress.com/18792/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqlauthority.wordpress.com/18792/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqlauthority.wordpress.com/18792/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqlauthority.wordpress.com/18792/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqlauthority.wordpress.com/18792/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqlauthority.wordpress.com/18792/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&#038;blog=668536&#038;post=18792&#038;subd=sqlauthority&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.sqlauthority.com/2012/05/20/sql-server-new-look-for-codeplexproject-hosting-for-open-source-software/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aa5a2264e8a27d802bb22ab6ccf688?s=96&#38;d=identicon" medium="image">
			<media:title type="html">pinaldave</media:title>
		</media:content>

		<media:content url="http://www.pinaldave.com/bimg/codeplex1.jpg" medium="image" />
	</item>
		<item>
		<title>SQL SERVER &#8211; Saturday Fun Puzzle with SQL Server DATETIME2 and CAST</title>
		<link>http://blog.sqlauthority.com/2012/05/19/sql-server-saturday-fun-puzzle-with-sql-server-datetime2-and-cast/</link>
		<comments>http://blog.sqlauthority.com/2012/05/19/sql-server-saturday-fun-puzzle-with-sql-server-datetime2-and-cast/#comments</comments>
		<pubDate>Sat, 19 May 2012 01:30:42 +0000</pubDate>
		<dc:creator>pinaldave</dc:creator>
				<category><![CDATA[PostADay]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Authority]]></category>
		<category><![CDATA[SQL DateTime]]></category>
		<category><![CDATA[SQL Puzzle]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[T SQL]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=18763</guid>
		<description><![CDATA[Note: I have used SQL Server 2012 for this small fun experiment. Here is what we are going to do. We will run the script one at time instead of running them all together and try to guess the answer. I am confident that many will get it correct but if you do not get [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&#038;blog=668536&#038;post=18763&#038;subd=sqlauthority&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">Note: I have used<em><strong> SQL Server 2012 </strong></em>for this small fun experiment.</p>
<p style="text-align:justify;">Here is what we are going to do. We will run the script one at time instead of running them all together and try to guess the answer. I am confident that many will get it correct but if you do not get correct, you learn something new.</p>
<p style="text-align:justify;">Let us create database and sample table.</p>
<p style="text-align:justify;"><code style="font-size:12px;"><span style="color:blue;">CREATE DATABASE </span><span style="color:black;">DB2012<br />
GO<br />
</span><span style="color:blue;">USE </span><span style="color:black;">DB2012<br />
GO<br />
</span><span style="color:blue;">CREATE TABLE </span><span style="color:black;">TableDT<br />
</span><span style="color:gray;">(</span><span style="color:black;">DT1 </span><span style="color:blue;">VARCHAR</span><span style="color:gray;">(</span><span style="color:black;">100</span><span style="color:gray;">), </span><span style="color:black;">DT2 DATETIME2</span><span style="color:gray;">,<br />
</span><span style="color:black;">DT1C </span><span style="color:blue;">AS </span><span style="color:black;">DT1</span><span style="color:gray;">, </span><span style="color:black;">DT2C </span><span style="color:blue;">AS </span><span style="color:black;">DT2</span><span style="color:gray;">);<br />
</span><span style="color:blue;">INSERT INTO </span><span style="color:black;">TableDT </span><span style="color:gray;">(</span><span style="color:black;">DT1</span><span style="color:gray;">, </span><span style="color:black;">DT2</span><span style="color:gray;">)<br />
</span><span style="color:blue;">SELECT </span><span style="color:magenta;">GETDATE</span><span style="color:gray;">(), </span><span style="color:magenta;">GETDATE</span><span style="color:gray;">()<br />
</span><span style="color:black;">GO</span></code></p>
<p style="text-align:justify;">There are four columns in the table. The first column DT1 is regular VARCHAR and second DT2 is DATETIME2. Both of the column are been populated with the same data as I have used the function GETDATE(). Now let us do the SELECT statement and get the result from both the columns.</p>
<p style="text-align:justify;">Before running the query please guess the answer and write it down on the paper or notepad.</p>
<h3 style="text-align:justify;">Question 1: Guess the resultset</h3>
<p style="text-align:justify;"><code style="font-size:12px;"><span style="color:blue;">SELECT </span><span style="color:black;">DT1</span><span style="color:gray;">, </span><span style="color:black;">DT2<br />
</span><span style="color:blue;">FROM </span><span style="color:black;">TableDT<br />
GO</span></code></p>
<p style="text-align:justify;">Now once again run the select statement on the same table but this time retrieve the computed columns only. Once again I suggest you write down the result on the notepad.</p>
<h3 style="text-align:justify;">Question 2: Guess the resultset</h3>
<p style="text-align:justify;"><code style="font-size:12px;"><span style="color:blue;">SELECT </span><span style="color:black;">DT1C</span><span style="color:gray;">, </span><span style="color:black;">DT2C<br />
</span><span style="color:blue;">FROM </span><span style="color:black;">TableDT<br />
GO</span></code></p>
<p style="text-align:justify;">Now here is the best part. Let us use the CAST function over the computed columns. Here I do want you to stop and guess the answer for sure. If you have not done it so far, stop do it, believe me you will like it.</p>
<h3 style="text-align:justify;">Question 3: Guess the resultset</h3>
<p style="text-align:justify;"><code style="font-size:12px;"><span style="color:blue;">SELECT </span><span style="color:magenta;">CAST</span><span style="color:gray;">(</span><span style="color:black;">DT1C </span><span style="color:blue;">AS </span><span style="color:black;">DATETIME2</span><span style="color:gray;">) </span><span style="color:black;">CDT1C</span><span style="color:gray;">,<br />
</span><span style="color:magenta;">CAST</span><span style="color:gray;">(</span><span style="color:black;">DT2C </span><span style="color:blue;">AS </span><span style="color:black;">DATETIME2</span><span style="color:gray;">) </span><span style="color:black;">CDT1C<br />
</span><span style="color:blue;">FROM </span><span style="color:black;">TableDT<br />
GO<br />
</span></code></p>
<p style="text-align:justify;">Now let us inspect all the answers together and see how many of you got it correct.</p>
<p style="text-align:justify;"><strong>Answer 1:</strong></p>
<p style="text-align:justify;"><img class="alignnone" src="http://www.pinaldave.com/bimg/dt1.jpg" alt="" width="457" height="192" /></p>
<p style="text-align:justify;"><strong>Answer 2:</strong></p>
<p style="text-align:justify;"><img class="alignnone" src="http://www.pinaldave.com/bimg/dt2.jpg" alt="" width="448" height="196" /></p>
<p style="text-align:justify;"><strong>Answer 3: </strong></p>
<p style="text-align:justify;"><img class="alignnone" src="http://www.pinaldave.com/bimg/dt3.jpg" alt="" width="485" height="188" /></p>
<p style="text-align:justify;">If you have not tried to run the script so far, you can execute all the three of the above script together over here and see the result together.</p>
<p style="text-align:justify;"><code style="font-size:12px;"><span style="color:blue;">SELECT </span><span style="color:magenta;">CAST</span><span style="color:gray;">(</span><span style="color:black;">DT1C </span><span style="color:blue;">AS </span><span style="color:black;">DATETIME2</span><span style="color:gray;">) </span><span style="color:black;">CDT1C</span><span style="color:gray;">,<br />
</span><span style="color:magenta;">CAST</span><span style="color:gray;">(</span><span style="color:black;">DT2C </span><span style="color:blue;">AS </span><span style="color:black;">DATETIME2</span><span style="color:gray;">) </span><span style="color:black;">CDT1C<br />
</span><span style="color:blue;">FROM </span><span style="color:black;">TableDT<br />
GO</span></code></p>
<p style="text-align:justify;"><img class="alignnone" src="http://www.pinaldave.com/bimg/ad4.jpg" alt="" /></p>
<p style="text-align:justify;">Here is the Saturday Fun question to you &#8211; why do we get same result from both of the expressions in Question 3, where as in question 2 both the expression have different answer. I will publish the valid answer with explanation in future blog posts.</p>
<p style="text-align:justify;">Reference: <strong></strong><strong>Pinal Dave (<a href="http://blog.sqlauthority.com/" target="_blank">http://blog.sqlauthority.com</a>)</strong></p>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<br />Filed under: <a href='http://blog.sqlauthority.com/category/technology/postaday/'>PostADay</a>, <a href='http://blog.sqlauthority.com/category/technology/sql/'>SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-authority/'>SQL Authority</a>, <a href='http://blog.sqlauthority.com/category/sql-datetime/'>SQL DateTime</a>, <a href='http://blog.sqlauthority.com/category/sql-puzzle/'>SQL Puzzle</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-query/'>SQL Query</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-server/'>SQL Server</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-tips-and-tricks/'>SQL Tips and Tricks</a>, <a href='http://blog.sqlauthority.com/category/technology/t-sql/'>T SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/'>Technology</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqlauthority.wordpress.com/18763/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqlauthority.wordpress.com/18763/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqlauthority.wordpress.com/18763/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqlauthority.wordpress.com/18763/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sqlauthority.wordpress.com/18763/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sqlauthority.wordpress.com/18763/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sqlauthority.wordpress.com/18763/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sqlauthority.wordpress.com/18763/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqlauthority.wordpress.com/18763/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqlauthority.wordpress.com/18763/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqlauthority.wordpress.com/18763/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqlauthority.wordpress.com/18763/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqlauthority.wordpress.com/18763/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqlauthority.wordpress.com/18763/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&#038;blog=668536&#038;post=18763&#038;subd=sqlauthority&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.sqlauthority.com/2012/05/19/sql-server-saturday-fun-puzzle-with-sql-server-datetime2-and-cast/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aa5a2264e8a27d802bb22ab6ccf688?s=96&#38;d=identicon" medium="image">
			<media:title type="html">pinaldave</media:title>
		</media:content>

		<media:content url="http://www.pinaldave.com/bimg/dt1.jpg" medium="image" />

		<media:content url="http://www.pinaldave.com/bimg/dt2.jpg" medium="image" />

		<media:content url="http://www.pinaldave.com/bimg/dt3.jpg" medium="image" />

		<media:content url="http://www.pinaldave.com/bimg/ad4.jpg" medium="image" />
	</item>
		<item>
		<title>SQL SERVER &#8211; Thinking about Deprecated, Discontinued Features and Breaking Changes while Upgrading to SQL Server 2012 &#8211; Guest Post by Nakul Vachhrajani</title>
		<link>http://blog.sqlauthority.com/2012/05/18/sql-server-thinking-about-deprecated-discontinued-features-and-breaking-changes-while-upgrading-to-sql-server-2012-guest-post-by-nakul-vachhrajani/</link>
		<comments>http://blog.sqlauthority.com/2012/05/18/sql-server-thinking-about-deprecated-discontinued-features-and-breaking-changes-while-upgrading-to-sql-server-2012-guest-post-by-nakul-vachhrajani/#comments</comments>
		<pubDate>Fri, 18 May 2012 01:30:12 +0000</pubDate>
		<dc:creator>pinaldave</dc:creator>
				<category><![CDATA[PostADay]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Authority]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[T SQL]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Upgrade]]></category>

		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=18745</guid>
		<description><![CDATA[Nakul Vachhrajani is a Technical Specialist and systems development professional with iGATE having a total IT experience of more than 7 years. Nakul is an active blogger with BeyondRelational.com (150+ blogs), and can also be found on forums at SQLServerCentral and BeyondRelational.com. Nakul has also been a guest columnist for SQLAuthority.com and SQLServerCentral.com. Nakul presented a [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&#038;blog=668536&#038;post=18745&#038;subd=sqlauthority&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;"><img class="alignleft" src="http://www.pinaldave.com/bimg/nakul.jpg" alt="" width="175" height="158" />Nakul Vachhrajani is a Technical Specialist and systems development professional with iGATE having a total IT experience of more than 7 years. Nakul is an active blogger with BeyondRelational.com (150+ blogs), and can also be found on forums at SQLServerCentral and BeyondRelational.com. Nakul has also been a guest columnist for SQLAuthority.com and SQLServerCentral.com. Nakul presented a webcast on the &#8220;Underappreciated Features of Microsoft SQL Server&#8221; at the Microsoft Virtual Tech Days Exclusive Webcast series (May 02-06, 2011) on May 06, 2011. He is also the author of a research paper on Database upgrade methodologies, which was published in a CSI journal, published nationwide. In addition to his passion about SQL Server, Nakul also contributes to the academia out of personal interest. He visits various colleges and universities as an external faculty to judge project activities being carried out by the students. <strong>Disclaimer:</strong> <em>The opinions expressed herein are his own personal opinions and do not represent his employer&#8217;s view in anyway.</em></p>
<h3 style="text-align:justify;"><a href="http://beyondrelational.com/modules/2/blogs/77/nakuls-blog.aspx" target="_blank">Blog</a> | <a href="http://www.linkedin.com/pub/nakul-vachhrajani/33/306/368" target="_blank">LinkedIn</a> | <a href="https://twitter.com/#!/nakulv_sql" target="_blank">Twitter</a> | <a href="https://plus.google.com/112861901934490409954/posts" target="_blank">Google+</a></h3>
<p>Let us hear the thoughts of Nakul in first person -</p>
<hr />
<p style="text-align:justify;">Those who have been following <a href="http://beyondrelational.com/modules/2/blogs/77/nakuls-blog.aspx" target="_blank">my blogs</a> would be aware that I am recently running a series on the database engine features that have been deprecated in Microsoft SQL Server 2012. Based on the response that I have received, I was quite surprised to know that most of the audience found these to be breaking changes, when in fact, they were not! It was then that I decided to write a little piece on how to plan your database upgrade such that it works with the next version of Microsoft SQL Server.</p>
<p style="text-align:justify;">Please note that the recommendations made in this article are high-level markers and are intended to help you think over the specific steps that you would need to take to upgrade your database.</p>
<h2 style="text-align:justify;">Refer the documentation &#8211; Understand the terms</h2>
<p style="text-align:justify;">Change is the only constant in this world. Therefore, whenever customer requirements, newer architectures and designs require software vendors to make a change to the keywords, functions, etc; they ensure that they provide their end users sufficient time to migrate over to the new standards before dropping off the old ones. Microsoft does that too with it’s Microsoft SQL Server product. Whenever a new SQL Server release is announced, it comes with a list of the following features:</p>
<ol style="text-align:justify;">
<li><strong>Breaking changes</strong>
<ol>
<li>These are changes that would break your currently running applications, scripts or functionalities that are based on earlier version of Microsoft SQL Server</li>
<li>These are mostly features whose behavior has been changed keeping in mind the newer architectures and designs</li>
<li><strong>Lesson:</strong> These are the changes that you need to be most worried about!</li>
</ol>
</li>
<li><strong>Discontinued features</strong>
<ol>
<li>These features are no longer available in the associated version of Microsoft SQL Server</li>
<li>These features used to be “deprecated” in the prior release</li>
<li><strong>Lesson:</strong> Without these changes, your database would not be compliant/may not work with the version of Microsoft SQL Server under consideration</li>
</ol>
</li>
<li><strong>Deprecated features</strong>
<ol>
<li>These features are those that are still available in the current version of Microsoft SQL Server, but are scheduled for removal in a future version. These may be removed in either the next version or any other future version of Microsoft SQL Server</li>
<li>The features listed for deprecation will compose the list of discontinued features in the next version of SQL Server</li>
<li><strong>Lesson:</strong> Plan to make necessary changes required to remove/replace usage of the deprecated features with the latest recommended replacements</li>
</ol>
</li>
</ol>
<p style="text-align:justify;">Once a feature appears on the list, it moves from bottom to the top, i.e. it is first marked as “Deprecated” and then “Discontinued”. We know of “Breaking change” comes later on in the product life cycle.</p>
<p style="text-align:justify;">What this means is that if you want to know what features would not work with SQL Server 2012 (and you are currently using SQL Server 2008 R2), you need to refer the list of breaking changes and discontinued features in SQL Server 2012.</p>
<h2 style="text-align:justify;">Use the tools!</h2>
<p style="text-align:justify;">There are a lot of tools and technologies around us, but it is rarely that I find teams using these tools religiously and to the best of their potential. Below are the top two tools, from Microsoft, that I use every time I plan a database upgrade.</p>
<h3 style="text-align:justify;">The SQL Server Upgrade Advisor</h3>
<p style="text-align:justify;">Ever since SQL Server 2005 was announced, Microsoft provides a small, very light-weight tool called the “SQL Server upgrade advisor”. The upgrade advisor analyzes installed components from earlier versions of SQL Server, and then generates a report that identifies issues to fix either before or after you upgrade. The analysis examines objects that can be accessed, such as scripts, stored procedures, triggers, and trace files. Upgrade Advisor cannot analyze desktop applications or encrypted stored procedures.</p>
<p style="text-align:justify;">Refer the links towards the end of the post to know how to get the Upgrade Advisor.</p>
<h3 style="text-align:justify;">The SQL Server Profiler</h3>
<p style="text-align:justify;">Another great tool that you can use is the one most SQL Server developers &amp; administrators use often – the SQL Server profiler. SQL Server Profiler provides functionality to monitor the “Deprecation” event, which contains:</p>
<ul style="text-align:justify;">
<li>Deprecation announcement – equivalent to features to be deprecated in a <em>future</em> release of SQL Server</li>
<li>Deprecation final support – equivalent to features to be deprecated in the <em>next</em> release of SQL Server</li>
</ul>
<p style="text-align:justify;">You can learn more using the links towards the end of the post.</p>
<h2 style="text-align:justify;">A basic checklist</h2>
<p style="text-align:justify;">There are a lot of finer points that need to be taken care of when upgrading your database. But, it would be worth-while to identify a few basic steps in order to make your database compliant with the next version of SQL Server:</p>
<ol style="text-align:justify;">
<li>Monitor the current application workload (on a test bed) via the Profiler in order to identify usage of features marked as Deprecated
<ol>
<li>If none appear, you are all set! (This almost never happens)</li>
<li>Note down all the offending queries and feature usages</li>
</ol>
</li>
<li>Run analysis sessions using the SQL Server upgrade advisor on your database</li>
<li>Based on the inputs from the analysis report and Profiler trace sessions,
<ol>
<li>Incorporate solutions for the breaking changes first</li>
<li>Next, incorporate solutions for the discontinued features</li>
</ol>
</li>
<li>Revisit and document the upgrade strategy for your deployment scenarios</li>
<li>Revisit the fall-back, i.e. rollback strategies in case the upgrades fail
<ol>
<li>Because some programming changes are dependent upon the SQL server version, this may need to be done in consultation with the development teams</li>
</ol>
</li>
<li>Before any other enhancements are incorporated by the development team, send out the database changes into QA
<ol>
<li>QA strategy should involve a comparison between an environment running the old version of SQL Server against the new one</li>
<li>Because minimal application changes have gone in (essential changes for SQL Server version compliance only), this would be possible</li>
</ol>
</li>
<li>As an ongoing activity, keep incorporating changes recommended as per the deprecated features list</li>
<li>As a DBA, update your coding standards to ensure that the developers are using ANSI compliant code – this code will require a change only if the ANSI standard changes</li>
</ol>
<p style="text-align:justify;"><strong>Remember this:</strong> Change management is a continuous process. Keep revisiting the product release notes and incorporate recommended changes to stay prepared for the next release of SQL Server.</p>
<p style="text-align:justify;"><strong>May the power of SQL Server be with you!</strong></p>
<h2 style="text-align:justify;">Links Referenced in this post</h2>
<ul style="text-align:justify;">
<li>Breaking changes in SQL Server 2012: <a href="http://msdn.microsoft.com/en-us/library/ms143179" target="_blank">Link</a></li>
<li>Discontinued features in SQL Server 2012: <a href="http://msdn.microsoft.com/en-us/library/ms144262" target="_blank">Link</a></li>
<li>Get the upgrade advisor from the Microsoft Download Center at: <a href="http://go.microsoft.com/fwlink/?LinkID=208776" target="_blank">Link</a></li>
<li>Upgrade Advisor page on MSDN: <a href="http://msdn.microsoft.com/en-us/library/ms144256" target="_blank">Link</a></li>
<li>Profiler: Review T-SQL code to identify objects no longer supported by Microsoft: <a href="http://beyondrelational.com/modules/2/blogs/77/posts/11375/sql-server-profiler-part-4-review-t-sql-code-to-identify-objects-no-longer-supported-by-microsoft-de.aspx" target="_blank">Link</a></li>
<li>Upgrading to SQL Server 2012 by Vinod Kumar: <a href="http://blogs.extremeexperts.com/2012/05/17/upgrading-to-sql-server-2012/" target="_blank">Link</a></li>
</ul>
<p style="text-align:justify;">Reference: <strong>Pinal Dave (<a href="http://blog.sqlauthority.com/" target="_blank">http://blog.sqlauthority.com</a>)</strong></p>
<div></div>
<br />Filed under: <a href='http://blog.sqlauthority.com/category/technology/postaday/'>PostADay</a>, <a href='http://blog.sqlauthority.com/category/technology/sql/'>SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-authority/'>SQL Authority</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-query/'>SQL Query</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-server/'>SQL Server</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-tips-and-tricks/'>SQL Tips and Tricks</a>, <a href='http://blog.sqlauthority.com/category/technology/t-sql/'>T SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/'>Technology</a> Tagged: <a href='http://blog.sqlauthority.com/tag/upgrade/'>Upgrade</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqlauthority.wordpress.com/18745/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqlauthority.wordpress.com/18745/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqlauthority.wordpress.com/18745/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqlauthority.wordpress.com/18745/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sqlauthority.wordpress.com/18745/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sqlauthority.wordpress.com/18745/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sqlauthority.wordpress.com/18745/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sqlauthority.wordpress.com/18745/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqlauthority.wordpress.com/18745/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqlauthority.wordpress.com/18745/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqlauthority.wordpress.com/18745/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqlauthority.wordpress.com/18745/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqlauthority.wordpress.com/18745/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqlauthority.wordpress.com/18745/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&#038;blog=668536&#038;post=18745&#038;subd=sqlauthority&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.sqlauthority.com/2012/05/18/sql-server-thinking-about-deprecated-discontinued-features-and-breaking-changes-while-upgrading-to-sql-server-2012-guest-post-by-nakul-vachhrajani/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aa5a2264e8a27d802bb22ab6ccf688?s=96&#38;d=identicon" medium="image">
			<media:title type="html">pinaldave</media:title>
		</media:content>

		<media:content url="http://www.pinaldave.com/bimg/nakul.jpg" medium="image" />
	</item>
		<item>
		<title>SQLAuthority News &#8211; SQL Server 2012 Upgrade Technical Guide &#8211; A Comprehensive Whitepaper &#8211; (454 pages &#8211; 9 MB)</title>
		<link>http://blog.sqlauthority.com/2012/05/17/sqlauthority-news-sql-server-2012-upgrade-technical-guide-a-comprehensive-whitepaper-454-pages-9-mb/</link>
		<comments>http://blog.sqlauthority.com/2012/05/17/sqlauthority-news-sql-server-2012-upgrade-technical-guide-a-comprehensive-whitepaper-454-pages-9-mb/#comments</comments>
		<pubDate>Thu, 17 May 2012 01:30:35 +0000</pubDate>
		<dc:creator>pinaldave</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[DBA]]></category>
		<category><![CDATA[PostADay]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Authority]]></category>
		<category><![CDATA[SQL Documentation]]></category>
		<category><![CDATA[SQL Download]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[SQL White Papers]]></category>
		<category><![CDATA[SQLAuthority News]]></category>
		<category><![CDATA[SQLServer]]></category>
		<category><![CDATA[T SQL]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=18717</guid>
		<description><![CDATA[Microsoft has just released SQL Server 2012 Upgrade Technical Guide. This guide is very comprehensive and covers the subject of upgrade in-depth. This is indeed a helpful detailed white paper. Even writing a summary of this white paper would take over 100 pages. This further proves that SQL Server 2012 is quite an important release from [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&#038;blog=668536&#038;post=18717&#038;subd=sqlauthority&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">Microsoft has just released SQL Server 2012 Upgrade Technical Guide. This guide is very comprehensive and covers the subject of upgrade in-depth. This is indeed a helpful detailed white paper. Even writing a summary of this white paper would take over 100 pages. This further proves that SQL Server 2012 is quite an important release from Microsoft. This white paper discusses how to upgrade from SQL Server 2008/R2 to SQL Server 2012. I love how it starts with the most interesting and basic discussion of upgrade strategies: 1) In-place upgrades, 2) Side by side upgrade, 3) One-server, and 4) Two-server. This whitepaper is not just pure theory but is also an excellent source for some tips and tricks. Here is an example of a good tip from the paper:</p>
<p style="text-align:justify;">&#8220;If you want to upgrade just one database from a legacy instance of SQL Server and not upgrade the other databases on the server, use the side-by-side upgrade method instead of the in-place method.&#8221;</p>
<p style="text-align:justify;"><img class="alignnone" src="http://www.pinaldave.com/bimg/SQLServer2012big.png" alt="" width="500" height="103" /></p>
<p style="text-align:justify;"><img class="alignleft" src="http://www.pinaldave.com/bimg/upgradenow.jpg" alt="" width="168" height="168" /></p>
<p style="text-align:justify;">There are so many trivia, tips and tricks that make creating the list seems humanly impossible given a short period of time. My friend Vinod Kumar, an SQL Server expert, wrote a very interesting article on SQL Server 2012 Upgrade before. In that article, Vinod addressed the most interesting and practical questions related to upgrades. He started with the fundamentals of how to start backup before upgrade and ended with fail-safe strategies after the upgrade is over. He covered end-to-end concepts in his blog posts in simple words in extremely precise statements.</p>
<p style="text-align:justify;">A successful upgrade uses a cycle of: planning, document process, testing, refine process, testing, planning upgrade window, execution, verifying of upgrade and opening for business. If you are at Vinod&#8217;s blog post, I suggest you go all the way down and collect the gold mine of most important links. I have bookmarked the blog by blogging about it and I suggest that you bookmark it as well with the way you prefer.</p>
<p style="text-align:justify;"><a href="http://blogs.extremeexperts.com/2012/05/17/upgrading-to-sql-server-2012/" target="_blank"><strong>Vinod Kumar&#8217;s blog post on SQL Server 2012 Upgrade Technical Guide</strong></a></p>
<p style="text-align:justify;">SQL Server 2012 Upgrade Technical Guide is a detailed resource that’s also available online for free. Each chapter was carefully crafted and explained in detail. Here is a quick list of the chapters included in the whitepaper. Before downloading the guide, beware of its size of 9 MB and 454 pages.</p>
<p style="text-align:justify;">Here’s the list of chapters:</p>
<p style="text-align:justify;">Chapter 1: Upgrade Planning and Deployment<br />
Chapter 2: Management Tools<br />
Chapter 3: Relational Databases<br />
Chapter 4: High Availability<br />
Chapter 5: Database Security<br />
Chapter 6: Full-Text Search<br />
Chapter 7: Service Broker<br />
Chapter 8: SQL Server Express<br />
Chapter 9: SQL Server Data Tools<br />
Chapter 10: Transact-SQL Queries<br />
Chapter 11: Spatial Data<br />
Chapter 12: XML and XQuery<br />
Chapter 13: CLR<br />
Chapter 14: SQL Server Management Objects<br />
Chapter 15: Business Intelligence Tools<br />
Chapter 16: Analysis Services<br />
Chapter 17: Integration Services<br />
Chapter 18: Reporting Services<br />
Chapter 19: Data Mining<br />
Chapter 20: Other Microsoft Applications and Platforms<br />
Appendix 1: Version and Edition Upgrade Paths<br />
Appendix 2: SQL Server 2012: Upgrade Planning Checklist</p>
<p style="text-align:justify;"><strong><a href="http://t.co/VcQaCMG3" target="_blank">Download SQL Server 2012 Upgrade Technical Guide</a></strong> [454 pages and 9 MB]</p>
<p style="text-align:justify;">Reference: <strong>Pinal Dave (<a href="http://blog.sqlauthority.com/" target="_blank">http://blog.sqlauthority.com</a>)</strong></p>
<div></div>
<div></div>
<br />Filed under: <a href='http://blog.sqlauthority.com/category/database/'>Database</a>, <a href='http://blog.sqlauthority.com/category/dba/'>DBA</a>, <a href='http://blog.sqlauthority.com/category/technology/postaday/'>PostADay</a>, <a href='http://blog.sqlauthority.com/category/technology/sql/'>SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-authority/'>SQL Authority</a>, <a href='http://blog.sqlauthority.com/category/sql-documentation/'>SQL Documentation</a>, <a href='http://blog.sqlauthority.com/category/sql-download/'>SQL Download</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-query/'>SQL Query</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-server/'>SQL Server</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-tips-and-tricks/'>SQL Tips and Tricks</a>, <a href='http://blog.sqlauthority.com/category/sql-white-papers/'>SQL White Papers</a>, <a href='http://blog.sqlauthority.com/category/sqlauthority/sqlauthority-news/'>SQLAuthority News</a>, <a href='http://blog.sqlauthority.com/category/sqlserver/'>SQLServer</a>, <a href='http://blog.sqlauthority.com/category/technology/t-sql/'>T SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/'>Technology</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqlauthority.wordpress.com/18717/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqlauthority.wordpress.com/18717/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqlauthority.wordpress.com/18717/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqlauthority.wordpress.com/18717/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sqlauthority.wordpress.com/18717/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sqlauthority.wordpress.com/18717/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sqlauthority.wordpress.com/18717/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sqlauthority.wordpress.com/18717/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqlauthority.wordpress.com/18717/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqlauthority.wordpress.com/18717/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqlauthority.wordpress.com/18717/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqlauthority.wordpress.com/18717/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqlauthority.wordpress.com/18717/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqlauthority.wordpress.com/18717/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&#038;blog=668536&#038;post=18717&#038;subd=sqlauthority&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.sqlauthority.com/2012/05/17/sqlauthority-news-sql-server-2012-upgrade-technical-guide-a-comprehensive-whitepaper-454-pages-9-mb/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aa5a2264e8a27d802bb22ab6ccf688?s=96&#38;d=identicon" medium="image">
			<media:title type="html">pinaldave</media:title>
		</media:content>

		<media:content url="http://www.pinaldave.com/bimg/SQLServer2012big.png" medium="image" />

		<media:content url="http://www.pinaldave.com/bimg/upgradenow.jpg" medium="image" />
	</item>
		<item>
		<title>SQL SERVER &#8211; SQL in Sixty Seconds &#8211; 5 Videos from Joes 2 Pros Series &#8211; SQL Exam Prep Series 70-433</title>
		<link>http://blog.sqlauthority.com/2012/05/16/sql-server-sql-in-sixty-seconds-5-videos-from-joes-2-pros-series-sql-exam-prep-series-70-433/</link>
		<comments>http://blog.sqlauthority.com/2012/05/16/sql-server-sql-in-sixty-seconds-5-videos-from-joes-2-pros-series-sql-exam-prep-series-70-433/#comments</comments>
		<pubDate>Wed, 16 May 2012 01:30:15 +0000</pubDate>
		<dc:creator>pinaldave</dc:creator>
				<category><![CDATA[PostADay]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Authority]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[T SQL]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Video]]></category>

		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=18693</guid>
		<description><![CDATA[Joes 2 Pros SQL Server Learning series is indeed fun. Joes 2 Pros series is written for beginners and who wants to build expertise for SQL Server programming and development from fundamental. In the beginning of the series author Rick Morelan is not shy to explain the simplest concept of how to open SQL Server [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&#038;blog=668536&#038;post=18693&#038;subd=sqlauthority&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;"><strong><a href="http://blog.sqlauthority.com/sql-server-books/sql-joes-2-pros-five-book-combo-list-of-best-sql-server-books/" target="_blank">Joes 2 Pros SQL Server</a></strong> Learning series is indeed fun. Joes 2 Pros series is written for beginners and who wants to build expertise for SQL Server programming and development from fundamental. In the beginning of the series author Rick Morelan is not shy to explain the simplest concept of how to open SQL Server Management Studio. Honestly the book starts with that much basic but as it progresses further Rick discussing about various advanced concepts from query tuning to Core Architecture.</p>
<p style="text-align:justify;">This five part series is written with keeping SQL Server Exam 70-433. Instead of just focusing on what will be there in exam, this series is focusing on learning the important concepts thoroughly. This book no way take short cut to explain any concepts and at times, will go beyond the topic at length. The best part is that all the books has many companion videos explaining the concepts and videos. Every Wednesday I like to post a video which explains something in quick few seconds. Today we will go over five videos which I posted in my earlier posts related to Joes 2 Pros series.</p>
<h3 id="watch-headline-title" style="text-align:justify;">Introduction to XML Data Type Methods &#8211; SQL in Sixty Seconds #015</h3>
<p style="text-align:justify;">The XML data type was first introduced with SQL Server 2005. This data type continues with SQL Server 2008 where expanded XML features are available, most notably is the power of the XQuery language to analyze and query the values contained in your XML instance.</p>
<p style="text-align:justify;">There are five XML data type methods available in SQL Server 2008:</p>
<p style="text-align:justify;"><strong>query()</strong> – Used to extract XML fragments from an XML data type.<br />
<strong>value()</strong> – Used to extract a single value from an XML document.<br />
<strong>exist()</strong> – Used to determine if a specified node exists. Returns 1 if yes and 0 if no.<br />
<strong>modify()</strong> – Updates XML data in an XML data type.<br />
<strong>node()</strong> – Shreds XML data into multiple rows (<em>not covered in this blog post</em>).</p>
<div style="text-align:justify;"><strong>[<a href="http://blog.sqlauthority.com/2012/04/27/sql-server-introduction-to-discovering-xml-data-type-methods-a-primer/" target="_blank">Detailed Blog Post</a>] | [<a href="http://blog.sqlauthority.com/2012/05/11/sql-server-quiz-and-video-introduction-to-discovering-xml-data-type-methods/" target="_blank">Quiz with Answer</a>]</strong></div>
<p style="text-align:justify;"><span class='embed-youtube' style='text-align:center; display: block;'><iframe class='youtube-player' type='text/html' width='500' height='312' src='http://www.youtube.com/embed/0g61qFIOL0o?version=3&#038;rel=1&#038;fs=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;wmode=transparent' frameborder='0'></iframe></span></p>
<h3 id="watch-headline-title" style="text-align:justify;">Introduction to SQL Error Actions &#8211; SQL in Sixty Seconds #014</h3>
<p style="text-align:justify;">Most people believe that when SQL Server encounters an error severity level 11 or higher the remaining SQL statements will not get executed. In addition, people also believe that if any error severity level of 11 or higher is hit inside an explicit transaction, then the whole statement will fail as a unit. While both of these beliefs are true 99% of the time, they are not true in all cases. It is these outlying cases that frequently cause unexpected results in your SQL code.</p>
<p style="text-align:justify;">To understand how to achieve consistent results you need to know the four ways SQL Error Actions can react to error severity levels 11-16:</p>
<p style="text-align:justify;"><strong>Statement Termination</strong> – The statement with the procedure fails but the code keeps on running to the next statement. Transactions are not affected.<br />
<strong>Scope Abortion</strong> – The current procedure, function or batch is aborted and the next calling scope keeps running. That is, if Stored Procedure A calls B and C, and B fails, then nothing in B runs but A continues to call C. @@Error is set but the procedure does not have a return value.<br />
<strong>Batch Termination</strong> – The entire client call is terminated.<br />
<strong>XACT_ABORT</strong> – (<strong>ON</strong> = The entire client call is terminated.) or (<strong>OFF</strong> = SQL Server will choose how to handle all errors.)</p>
<p style="text-align:justify;"><strong>[<a href="http://blog.sqlauthority.com/2012/04/26/sql-server-introduction-to-sql-error-actions-a-primer/" target="_blank">Detailed Blog Post</a>] | [<a href="http://blog.sqlauthority.com/2012/05/10/sql-server-quiz-and-video-introduction-to-sql-error-actions/" target="_blank">Quiz with Answer</a>]</strong></p>
<p style="text-align:justify;"><span class='embed-youtube' style='text-align:center; display: block;'><iframe class='youtube-player' type='text/html' width='500' height='312' src='http://www.youtube.com/embed/fPjOhr3b5Pk?version=3&#038;rel=1&#038;fs=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;wmode=transparent' frameborder='0'></iframe></span></p>
<h3 id="watch-headline-title" style="text-align:justify;">Introduction to Basics of a Query Hint &#8211; SQL in Sixty Seconds #013</h3>
<p style="text-align:justify;">Query hints specify that the indicated hints should be used throughout the query. Query hints affect all operators in the statement and are implemented using the OPTION clause. Cautionary Note: Because the SQL Server Query Optimizer typically selects the best execution plan for a query, it is highly recommended that hints be used as a last resort for experienced developers and database administrators to achieve the desired results.</p>
<p style="text-align:justify;"><strong>[<a href="http://blog.sqlauthority.com/2012/04/25/sql-server-introduction-to-basics-of-a-query-hint-a-primer/" target="_blank">Detailed Blog Post</a>] | [<a href="http://blog.sqlauthority.com/2012/05/09/sql-server-quiz-and-video-introduction-to-basics-of-a-query-hint/" target="_blank">Quiz with Answer</a>]</strong></p>
<p style="text-align:justify;"><span class='embed-youtube' style='text-align:center; display: block;'><iframe class='youtube-player' type='text/html' width='500' height='312' src='http://www.youtube.com/embed/0GTeUHkdZtc?version=3&#038;rel=1&#038;fs=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;wmode=transparent' frameborder='0'></iframe></span></p>
<h3 id="watch-headline-title" style="text-align:justify;">Introduction to Hierarchical Query &#8211; SQL in Sixty Seconds #012</h3>
<p style="text-align:justify;">A CTE can be thought of as a temporary result set and are similar to a derived table in that it is not stored as an object and lasts only for the duration of the query. A CTE is generally considered to be more readable than a derived table and does not require the extra effort of declaring a Temp Table while providing the same benefits to the user. However; a CTE is more powerful than a derived table as it can also be self-referencing, or even referenced multiple times in the same query. A recursive CTE requires four elements in order to work properly:</p>
<p style="text-align:justify;">Anchor query (runs once and the results ‘seed’ the Recursive query)<br />
Recursive query (runs multiple times and is the criteria for the remaining results)<br />
UNION ALL statement to bind the Anchor and Recursive queries together.<br />
INNER JOIN statement to bind the Recursive query to the results of the CTE.</p>
<p style="text-align:justify;"><strong>[<a href="http://blog.sqlauthority.com/2012/04/24/sql-server-introduction-to-hierarchical-query-using-a-recursive-cte-a-primer/" target="_blank">Detailed Blog Post</a>] | [<a href="http://blog.sqlauthority.com/2012/05/08/sql-server-quiz-and-video-introduction-to-hierarchical-query-using-a-recursive-cte/" target="_blank">Quiz with Answer</a>]</strong></p>
<p style="text-align:justify;"><span class='embed-youtube' style='text-align:center; display: block;'><iframe class='youtube-player' type='text/html' width='500' height='312' src='http://www.youtube.com/embed/fbOGQlkFVqI?version=3&#038;rel=1&#038;fs=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;wmode=transparent' frameborder='0'></iframe></span></p>
<h3 id="watch-headline-title" style="text-align:justify;">Introduction to SQL Server Security &#8211; SQL in Sixty Seconds #011</h3>
<p style="text-align:justify;">Let’s get some basic definitions down first. Take the workplace example where “Tom” needs “Read” access to the “Financial Folder”. What are the Securable, Principal, and Permissions from that last sentence?</p>
<p style="text-align:justify;">A <strong>Securable</strong> is a resource that someone might want to access (like the Financial Folder).<br />
A <strong>Principal</strong> is anything that might want to gain access to the securable (like Tom).<br />
A <strong>Permission</strong> is the level of access a principal has to a securable (like Read).</p>
<p style="text-align:justify;">[<a href="http://blog.sqlauthority.com/2012/04/23/sql-server-introduction-to-sql-server-security-a-primer/" target="_blank">Detailed Blog Post</a>] | [<a href="http://blog.sqlauthority.com/2012/05/07/sql-server-quiz-and-video-introduction-to-sql-server-security/" target="_blank">Quiz with Answer</a>]</p>
<p style="text-align:justify;"><span class='embed-youtube' style='text-align:center; display: block;'><iframe class='youtube-player' type='text/html' width='500' height='312' src='http://www.youtube.com/embed/NnaTqgyJGyU?version=3&#038;rel=1&#038;fs=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;wmode=transparent' frameborder='0'></iframe></span></p>
<p style="text-align:justify;">Please leave a comment explain which one was your favorite video as that will help me understand what works and what needs improvement.</p>
<p style="text-align:justify;">Reference: <strong>Pinal Dave (<a href="http://blog.sqlauthority.com/" target="_blank">http://blog.sqlauthority.com</a>)</strong></p>
<div style="text-align:justify;"></div>
<div style="text-align:justify;"></div>
<div style="text-align:justify;"></div>
<div style="text-align:justify;"></div>
<div style="text-align:justify;"></div>
<div style="text-align:justify;"></div>
<div style="text-align:justify;"></div>
<div style="text-align:justify;"></div>
<div style="text-align:justify;"></div>
<div style="text-align:justify;"></div>
<div style="text-align:justify;"></div>
<div style="text-align:justify;"></div>
<div style="text-align:justify;"></div>
<div style="text-align:justify;"></div>
<div style="text-align:justify;"></div>
<div></div>
<div></div>
<div></div>
<br />Filed under: <a href='http://blog.sqlauthority.com/category/technology/postaday/'>PostADay</a>, <a href='http://blog.sqlauthority.com/category/technology/sql/'>SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-authority/'>SQL Authority</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-query/'>SQL Query</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-server/'>SQL Server</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-tips-and-tricks/'>SQL Tips and Tricks</a>, <a href='http://blog.sqlauthority.com/category/technology/t-sql/'>T SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/'>Technology</a>, <a href='http://blog.sqlauthority.com/category/video/'>Video</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqlauthority.wordpress.com/18693/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqlauthority.wordpress.com/18693/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqlauthority.wordpress.com/18693/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqlauthority.wordpress.com/18693/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sqlauthority.wordpress.com/18693/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sqlauthority.wordpress.com/18693/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sqlauthority.wordpress.com/18693/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sqlauthority.wordpress.com/18693/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqlauthority.wordpress.com/18693/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqlauthority.wordpress.com/18693/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqlauthority.wordpress.com/18693/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqlauthority.wordpress.com/18693/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqlauthority.wordpress.com/18693/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqlauthority.wordpress.com/18693/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&#038;blog=668536&#038;post=18693&#038;subd=sqlauthority&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.sqlauthority.com/2012/05/16/sql-server-sql-in-sixty-seconds-5-videos-from-joes-2-pros-series-sql-exam-prep-series-70-433/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aa5a2264e8a27d802bb22ab6ccf688?s=96&#38;d=identicon" medium="image">
			<media:title type="html">pinaldave</media:title>
		</media:content>
	</item>
		<item>
		<title>SQL SERVER &#8211; Get Schema Name from Object ID using OBJECT_SCHEMA_NAME</title>
		<link>http://blog.sqlauthority.com/2012/05/15/sql-server-get-schema-name-from-object-id-using-object_schema_name/</link>
		<comments>http://blog.sqlauthority.com/2012/05/15/sql-server-get-schema-name-from-object-id-using-object_schema_name/#comments</comments>
		<pubDate>Tue, 15 May 2012 01:30:21 +0000</pubDate>
		<dc:creator>pinaldave</dc:creator>
				<category><![CDATA[PostADay]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Authority]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL System Table]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[T SQL]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=18678</guid>
		<description><![CDATA[Sometime a simple solution have even simpler solutions but we often do not practice it as we do not see value in it or find it useful. Well, today&#8217;s blog post is also about something which I have seen not practiced much in codes. We are so much comfortable with alternative usage that we do [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&#038;blog=668536&#038;post=18678&#038;subd=sqlauthority&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">Sometime a simple solution have even simpler solutions but we often do not practice it as we do not see value in it or find it useful. Well, today&#8217;s blog post is also about something which I have seen not practiced much in codes. We are so much comfortable with alternative usage that we do not feel like switching how we query the data.</p>
<p style="text-align:justify;">I was going over forums and I noticed that at one place user has used following code to get Schema Name from ObjectID.</p>
<p style="text-align:justify;"><code style="font-size:12px;"><span style="color:blue;">USE </span><span style="color:black;">AdventureWorks2012<br />
GO<br />
</span><span style="color:blue;">SELECT </span><span style="color:black;">s.name </span><span style="color:blue;">AS </span><span style="color:black;">SchemaName</span><span style="color:gray;">, </span><span style="color:black;">t.name </span><span style="color:blue;">AS </span><span style="color:black;">TableName</span><span style="color:gray;">,<br />
</span><span style="color:black;">s.schema_id</span><span style="color:gray;">, </span><span style="color:black;">t.</span><span style="color:magenta;">OBJECT_ID<br />
</span><span style="color:blue;">FROM </span><span style="color:black;">sys.Tables t<br />
</span><span style="color:blue;">INNER JOIN </span><span style="color:black;">sys.schemas s </span><span style="color:blue;">ON </span><span style="color:black;">s.schema_id </span><span style="color:blue;">= </span><span style="color:black;">t.schema_id<br />
</span><span style="color:blue;">WHERE </span><span style="color:black;">t.name </span><span style="color:blue;">= </span><span style="color:magenta;">OBJECT_NAME</span><span style="color:gray;">(</span><span style="color:black;">46623209</span><span style="color:gray;">)<br />
</span><span style="color:black;">GO</span></code></p>
<p style="text-align:justify;">Before I continue let me say I do not see anything wrong with this script. It is just fine and one of the way to get SchemaName from Object ID.</p>
<p style="text-align:justify;">However, I have been using function OBJECT_SCHEMA_NAME to get the schema name. If I have to write the same code from the beginning I would have written the same code as following.</p>
<p style="text-align:justify;"><code style="font-size:12px;"><span style="color:blue;">SELECT </span><span style="color:black;">OBJECT_SCHEMA_NAME</span><span style="color:gray;">(</span><span style="color:black;">46623209</span><span style="color:gray;">) </span><span style="color:blue;">AS </span><span style="color:black;">SchemaName</span><span style="color:gray;">, </span><span style="color:black;">t.name </span><span style="color:blue;">AS </span><span style="color:black;">TableName</span><span style="color:gray;">,<br />
</span><span style="color:black;">t.schema_id</span><span style="color:gray;">, </span><span style="color:black;">t.</span><span style="color:magenta;">OBJECT_ID<br />
</span><span style="color:blue;">FROM </span><span style="color:black;">sys.tables t<br />
</span><span style="color:blue;">WHERE </span><span style="color:black;">t.name </span><span style="color:blue;">= </span><span style="color:magenta;">OBJECT_NAME</span><span style="color:gray;">(</span><span style="color:black;">46623209</span><span style="color:gray;">)<br />
</span><span style="color:black;">GO</span></code></p>
<p style="text-align:justify;">Now, both of the above code give you exact same result. If you remove the WHERE condition it will give you information of all the tables of the database.</p>
<p style="text-align:justify;">Now the question is which one is better &#8211; honestly &#8211; it is not about one is better than other. Use the one which you prefer to use. I prefer to use second one as it requires less typing. Let me ask you the same question to you &#8211; which method to get schema name do yo use? and Why?</p>
<p style="text-align:justify;">Reference: <strong>Pinal Dave (<a href="http://blog.sqlauthority.com/" target="_blank">http://blog.sqlauthority.com</a>)</strong></p>
<div></div>
<div></div>
<br />Filed under: <a href='http://blog.sqlauthority.com/category/technology/postaday/'>PostADay</a>, <a href='http://blog.sqlauthority.com/category/technology/sql/'>SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-authority/'>SQL Authority</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-query/'>SQL Query</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-server/'>SQL Server</a>, <a href='http://blog.sqlauthority.com/category/sql-system-table/'>SQL System Table</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-tips-and-tricks/'>SQL Tips and Tricks</a>, <a href='http://blog.sqlauthority.com/category/technology/t-sql/'>T SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/'>Technology</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqlauthority.wordpress.com/18678/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqlauthority.wordpress.com/18678/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqlauthority.wordpress.com/18678/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqlauthority.wordpress.com/18678/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sqlauthority.wordpress.com/18678/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sqlauthority.wordpress.com/18678/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sqlauthority.wordpress.com/18678/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sqlauthority.wordpress.com/18678/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqlauthority.wordpress.com/18678/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqlauthority.wordpress.com/18678/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqlauthority.wordpress.com/18678/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqlauthority.wordpress.com/18678/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqlauthority.wordpress.com/18678/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqlauthority.wordpress.com/18678/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&#038;blog=668536&#038;post=18678&#038;subd=sqlauthority&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.sqlauthority.com/2012/05/15/sql-server-get-schema-name-from-object-id-using-object_schema_name/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aa5a2264e8a27d802bb22ab6ccf688?s=96&#38;d=identicon" medium="image">
			<media:title type="html">pinaldave</media:title>
		</media:content>
	</item>
		<item>
		<title>SQL SERVER &#8211; Columnstore Index and sys.dm_db_index_usage_stats</title>
		<link>http://blog.sqlauthority.com/2012/05/14/sql-server-columnstore-index-and-sys-dm_db_index_usage_stats/</link>
		<comments>http://blog.sqlauthority.com/2012/05/14/sql-server-columnstore-index-and-sys-dm_db_index_usage_stats/#comments</comments>
		<pubDate>Mon, 14 May 2012 01:30:03 +0000</pubDate>
		<dc:creator>pinaldave</dc:creator>
				<category><![CDATA[PostADay]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Authority]]></category>
		<category><![CDATA[SQL Index]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[T SQL]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=18649</guid>
		<description><![CDATA[As you know I have been writing on Columnstore Index for quite a while. Recently my friend Vinod Kumar wrote about  SQL Server 2012: ColumnStore Characteristics. A fantastic read on the subject if you have yet not caught up on that subject. After the blog post I called him and asked what should I write [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&#038;blog=668536&#038;post=18649&#038;subd=sqlauthority&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">As you know I have been writing on Columnstore Index for quite a while. Recently my friend Vinod Kumar wrote about  <strong><a title="Permanent Link to SQL Server 2012: ColumnStore Characteristics" href="http://blogs.extremeexperts.com/2012/05/10/sql-server-2012-columnstore-characteristics/" rel="bookmark">SQL Server 2012: ColumnStore Characteristics</a></strong>. A fantastic read on the subject if you have yet not caught up on that subject. After the blog post I called him and asked what should I write next on this subject. He suggested that I should write on DMV script which I have prepared related to Columnstore when I was writing our SQL Server Questions and Answers book. When we were writing this book SQL Server 2012 CTP versions were available. I had written few scripts related to SQL Server columnstore Index. I like Vinod&#8217;s idea and I decided to write about DMV, which we did not cover in the book as SQL Server 2012 was not released yet. We did not want to talk about the product which was not yet released.</p>
<p style="text-align:justify;">The first script which I had written was with DMV - sys.column_store_index_stats. This DMV was displaying the statistics of the columnstore indexes. When I attempted to run it on SQL Server 2012 RTM it gave me error suggesting that this DMV does not exists.</p>
<p style="text-align:justify;">Here is the script which I ran:</p>
<p style="text-align:justify;"><code style="font-size:12px;"><span style="color:blue;">SELECT </span><span style="color:gray;">*<br />
</span><span style="color:blue;">FROM </span><span style="color:black;">sys.column_store_index_stats</span><span style="color:gray;">;</span></code></p>
<p style="text-align:justify;">It generated following error:</p>
<p style="text-align:justify;"><span style="color:#ff0000;">Msg 208, Level 16, State 1, Line 1</span><br />
<span style="color:#ff0000;"> Invalid object name &#8216;column_store_index_stats&#8217;.</span></p>
<p style="text-align:justify;">I was pretty confident that this DMV was available when I had written the scripts. The next reaction was to type &#8216;sys.&#8217; only in SSMS and wait for intelisense to popup DMV list. I scrolled down and noticed that above said DMV did not exists there as well.</p>
<p style="text-align:justify;"><img class="alignnone" src="http://www.pinaldave.com/bimg/columndmv.png" alt="" width="453" height="293" /></p>
<p style="text-align:justify;"><strong>Now this is not bug or missing feature.</strong> This was indeed something can happen because the version which I was practicing was early CTP version. If you go to the page of the DMV <a href="http://msdn.microsoft.com/en-us/library/gg492074.aspx" target="_blank">here</a>, it clearly stats notice on the top of the page.</p>
<p style="padding-left:30px;text-align:justify;">This documentation is for preview only, and is subject to change in later releases.</p>
<p style="text-align:justify;">Now this was not alarming but my next thought was if this DMV is not there where can I find the information which this DMV was providing. Well, while I was thinking about this, I noticed that my another friend <strong><a href="http://sqlserver-help.com/" target="_blank">Balmukund Lakhani</a></strong> was online on personal messenger. Well, Balmukund is &#8220;Know All&#8221; kid. I have yet to find situation where I have not got my answers from him. I immediately pinged him and asked the question regarding where can I find information of &#8216;column_store_index_stats&#8217;. His answer was very abrupt but enlightening for sure. Here is our conversation:</p>
<p style="text-align:justify;"><em><strong>Pinal</strong>: Where can I find information of column_store_index_stats?</em><br />
<em><strong>Balmukund</strong>: Assume you have never worked with CTP before and now try to find the information which you are trying to find.</em></p>
<p style="text-align:justify;">Honestly  it was fantastic response from him. I was confused as I have played extensively with CTP versions of SQL Server 2012. Now his response give me big hint. I should have not looked for DMV but rather should have focused on what I wanted to do. I wanted to retrieve the statistics related to the index. In SQL Server 2008/R2, I was able to retrieve the statistics of the index from the DMV - sys.dm_db_index_usage_stats. I used the same DMV on SQL Server 2012 and it did retrieved the necessary information for me.</p>
<p style="text-align:justify;">Here is the updated script which gave me all the necessary information I was looking for. Matter of the fact, if I have used my earlier SQL Server 2008 R2 script this would have just worked fine.</p>
<p><code style="font-size:12px;"><span style="color:blue;">SELECT </span><span style="color:magenta;">DB_NAME</span><span style="color:gray;">(</span><span style="color:black;">Database_ID</span><span style="color:gray;">) </span><span style="color:black;">DBName</span><span style="color:gray;">,<br />
</span><span style="color:black;">SCHEMA_NAME</span><span style="color:gray;">(</span><span style="color:black;">schema_id</span><span style="color:gray;">) </span><span style="color:blue;">AS </span><span style="color:black;">SchemaName</span><span style="color:gray;">,<br />
</span><span style="color:magenta;">OBJECT_NAME</span><span style="color:gray;">(</span><span style="color:black;">ius.</span><span style="color:magenta;">OBJECT_ID</span><span style="color:gray;">) </span><span style="color:black;">ObjName</span><span style="color:gray;">,<br />
</span><span style="color:black;">i.type_desc</span><span style="color:gray;">, </span><span style="color:black;">i.name</span><span style="color:gray;">,<br />
</span><span style="color:black;">user_seeks</span><span style="color:gray;">, </span><span style="color:black;">user_scans</span><span style="color:gray;">,<br />
</span><span style="color:black;">user_lookups</span><span style="color:gray;">, </span><span style="color:black;">user_updates</span><span style="color:gray;">,*<br />
</span><span style="color:blue;">FROM </span><span style="color:black;">sys.dm_db_index_usage_stats ius<br />
</span><span style="color:blue;">INNER JOIN </span><span style="color:black;">sys.indexes i<br />
</span><span style="color:blue;">ON </span><span style="color:black;">i.index_id </span><span style="color:blue;">= </span><span style="color:black;">ius.index_id<br />
</span><span style="color:gray;">AND </span><span style="color:black;">ius.</span><span style="color:magenta;">OBJECT_ID </span><span style="color:blue;">= </span><span style="color:black;">i.</span><span style="color:magenta;">OBJECT_ID<br />
</span><span style="color:blue;">INNER JOIN </span><span style="color:black;">sys.tables t </span><span style="color:blue;">ON </span><span style="color:black;">t.</span><span style="color:magenta;">OBJECT_ID </span><span style="color:blue;">= </span><span style="color:black;">i.</span><span style="color:magenta;">OBJECT_ID<br />
</span><span style="color:black;">GO</span></code></p>
<p style="text-align:justify;">Let us see the resultset of above query.</p>
<p style="text-align:justify;"><img class="alignnone" src="http://www.pinaldave.com/bimg/columndmv1.png" alt="" width="500" height="117" /></p>
<p style="text-align:justify;">You will notice that column Type_desc describes the type of the index. You can additionally write WHERE condition on the column and only retrieve only selected type of Index.</p>
<p style="text-align:justify;">Reference: <strong>Pinal Dave (<a href="http://blog.sqlauthority.com/" target="_blank">http://blog.sqlauthority.com</a>)</strong></p>
<div></div>
<br />Filed under: <a href='http://blog.sqlauthority.com/category/technology/postaday/'>PostADay</a>, <a href='http://blog.sqlauthority.com/category/technology/sql/'>SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-authority/'>SQL Authority</a>, <a href='http://blog.sqlauthority.com/category/sql-index/'>SQL Index</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-query/'>SQL Query</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-server/'>SQL Server</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-tips-and-tricks/'>SQL Tips and Tricks</a>, <a href='http://blog.sqlauthority.com/category/technology/t-sql/'>T SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/'>Technology</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqlauthority.wordpress.com/18649/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqlauthority.wordpress.com/18649/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqlauthority.wordpress.com/18649/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqlauthority.wordpress.com/18649/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sqlauthority.wordpress.com/18649/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sqlauthority.wordpress.com/18649/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sqlauthority.wordpress.com/18649/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sqlauthority.wordpress.com/18649/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqlauthority.wordpress.com/18649/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqlauthority.wordpress.com/18649/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqlauthority.wordpress.com/18649/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqlauthority.wordpress.com/18649/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqlauthority.wordpress.com/18649/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqlauthority.wordpress.com/18649/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&#038;blog=668536&#038;post=18649&#038;subd=sqlauthority&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.sqlauthority.com/2012/05/14/sql-server-columnstore-index-and-sys-dm_db_index_usage_stats/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aa5a2264e8a27d802bb22ab6ccf688?s=96&#38;d=identicon" medium="image">
			<media:title type="html">pinaldave</media:title>
		</media:content>

		<media:content url="http://www.pinaldave.com/bimg/columndmv.png" medium="image" />

		<media:content url="http://www.pinaldave.com/bimg/columndmv1.png" medium="image" />
	</item>
		<item>
		<title>SQLAuthority News &#8211; Download Whitepaper &#8211; Choosing a Tabular or Multidimensional Modeling Experience in SQL Server 2012 Analysis Services</title>
		<link>http://blog.sqlauthority.com/2012/05/13/sqlauthority-news-download-whitepaper-choosing-a-tabular-or-multidimensional-modeling-experience-in-sql-server-2012-analysis-services/</link>
		<comments>http://blog.sqlauthority.com/2012/05/13/sqlauthority-news-download-whitepaper-choosing-a-tabular-or-multidimensional-modeling-experience-in-sql-server-2012-analysis-services/#comments</comments>
		<pubDate>Sun, 13 May 2012 01:30:59 +0000</pubDate>
		<dc:creator>pinaldave</dc:creator>
				<category><![CDATA[Business Intelligence]]></category>
		<category><![CDATA[PostADay]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Authority]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[SQL White Papers]]></category>
		<category><![CDATA[T SQL]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=18638</guid>
		<description><![CDATA[Data modeling is the most important task for any BI professional. Matter of the fact, the biggest challenge is to organizing disparate data into an analytic model that effectively and efficiently supports the reporting and analysis. SQL Server 2012 introduces BI Semantic Model (BISM), a single model that can support a broad range of reporting and analysis [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&#038;blog=668536&#038;post=18638&#038;subd=sqlauthority&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">Data modeling is the most important task for any BI professional. Matter of the fact, the biggest challenge is to organizing disparate data into an analytic model that effectively and efficiently supports the reporting and analysis. SQL Server 2012 introduces BI Semantic Model (BISM), a single model that can support a broad range of reporting and analysis while blending two Analysis Services modeling experiences behind the scenes.</p>
<ul style="text-align:justify;">
<li>Multidimensional modeling &#8211; enables BI professionals to create sophisticated multidimensional cubes using traditional online analytical processing (OLAP).</li>
<li>Tabular modeling &#8211; provides self-service data modeling capabilities to business and data analysts.</li>
</ul>
<div style="text-align:justify;">As data modeling is evolving and business needs are growing new technologies and tools are emerging to help end users to make the necessary adjustment to the reporting and analysis needs. This white paper is will provide practical guidance to help you decide which SQL Server 2012 Analysis Services modeling experience – tabular or multidimensional.</div>
<p style="text-align:justify;">Do let me know what do is your opinion as a comment. In simple word &#8211; I would like to know when will you use Tabular modeling and when Multidimensional modeling?</p>
<p style="text-align:justify;"><a href="http://download.microsoft.com/download/D/2/0/D20E1C5F-72EA-4505-9F26-FEF9550EFD44/SQL2012AS%20Multidimensional%20Modeling.docx" target="_blank">Download Choosing a Tabular or Multidimensional Modeling Experience in SQL Server 2012 Analysis Services</a></p>
<p style="text-align:justify;">Reference:<strong></strong> <strong>Pinal Dave (<a href="http://blog.sqlauthority.com/" target="_blank">http://blog.SQLAuthority.com</a>)</strong></p>
<div></div>
<div></div>
<br />Filed under: <a href='http://blog.sqlauthority.com/category/business-intelligence/'>Business Intelligence</a>, <a href='http://blog.sqlauthority.com/category/technology/postaday/'>PostADay</a>, <a href='http://blog.sqlauthority.com/category/technology/sql/'>SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-authority/'>SQL Authority</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-query/'>SQL Query</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-server/'>SQL Server</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-tips-and-tricks/'>SQL Tips and Tricks</a>, <a href='http://blog.sqlauthority.com/category/sql-white-papers/'>SQL White Papers</a>, <a href='http://blog.sqlauthority.com/category/technology/t-sql/'>T SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/'>Technology</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqlauthority.wordpress.com/18638/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqlauthority.wordpress.com/18638/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqlauthority.wordpress.com/18638/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqlauthority.wordpress.com/18638/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sqlauthority.wordpress.com/18638/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sqlauthority.wordpress.com/18638/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sqlauthority.wordpress.com/18638/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sqlauthority.wordpress.com/18638/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqlauthority.wordpress.com/18638/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqlauthority.wordpress.com/18638/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqlauthority.wordpress.com/18638/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqlauthority.wordpress.com/18638/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqlauthority.wordpress.com/18638/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqlauthority.wordpress.com/18638/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&#038;blog=668536&#038;post=18638&#038;subd=sqlauthority&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.sqlauthority.com/2012/05/13/sqlauthority-news-download-whitepaper-choosing-a-tabular-or-multidimensional-modeling-experience-in-sql-server-2012-analysis-services/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aa5a2264e8a27d802bb22ab6ccf688?s=96&#38;d=identicon" medium="image">
			<media:title type="html">pinaldave</media:title>
		</media:content>
	</item>
		<item>
		<title>SQL SERVER &#8211; Developer Training Kit for SQL Server 2012</title>
		<link>http://blog.sqlauthority.com/2012/05/12/sql-server-developer-training-kit-for-sql-server-2012/</link>
		<comments>http://blog.sqlauthority.com/2012/05/12/sql-server-developer-training-kit-for-sql-server-2012/#comments</comments>
		<pubDate>Sat, 12 May 2012 01:30:09 +0000</pubDate>
		<dc:creator>pinaldave</dc:creator>
				<category><![CDATA[Developer Training]]></category>
		<category><![CDATA[PostADay]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Authority]]></category>
		<category><![CDATA[SQL Documentation]]></category>
		<category><![CDATA[SQL Download]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[SQLAuthority News]]></category>
		<category><![CDATA[T SQL]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=18614</guid>
		<description><![CDATA[Developer Training Kit is my favorite part of any product. The reason behind is very simple because it give the single resource which gives complete overview of the product in nutshell. A developer can learn from many places &#8211; books, webcasts, tutorials, blogs, etc. However, I have found that developer training kits are the best [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&#038;blog=668536&#038;post=18614&#038;subd=sqlauthority&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">Developer Training Kit is my favorite part of any product. The reason behind is very simple because it give the single resource which gives complete overview of the product in nutshell. A developer can learn from many places &#8211; books, webcasts, tutorials, blogs, etc. However, I have found that developer training kits are the best starting point for any product. Start with them first, see what are the new features as well what is the new message a product is coming up with. Once it is learned the very next step should be to identify the right learning material to explore the preferred topic.</p>
<p style="text-align:justify;">The SQL Server 2012 Developer Training Kit includes technical content including labs, demos and presentations designed to help you learn how to develop SQL Server 2012 database and BI solutions. New and updated content will be released periodically and can be downloaded on-demand using the Web Installer.</p>
<p style="text-align:justify;"><a href="http://www.microsoft.com/en-us/download/details.aspx?id=27721" target="_blank">Download SQL Server 2012 Developer Training Kit Web Installer</a>.</p>
<p style="text-align:justify;">This training kit was available earlier this year but it is never late to explore it if you have not referred it earlier. Additionally, if you do not want to download complete kit all together I suggest you refer to Wiki here. This wiki contains all the same presentations and demo notes which web installer contains.</p>
<p style="text-align:justify;"><a href="http://social.technet.microsoft.com/wiki/contents/articles/6982.sql-server-2012-developer-training-kit-bom-en-us.aspx" target="_blank">Refer to SQL Server 2012 Developer Training Kit Wiki</a></p>
<p style="text-align:justify;">Wiki contains following module and details about Hands On Labs<br />
Module 1: Introduction to SQL Server 2012<br />
Module 2: Introduction to SQL Server 2012 AlwaysOn<br />
Module 3: Exploring and Managing SQL Server 2012 Database Engine Improvements<br />
Module 4: SQL Server 2012 Database Server Programmability<br />
Module 5: SQL Server 2012 Application Development<br />
Module 6: SQL Server 2012 Enterprise Information Management<br />
Module 7: SQL Server 2012 Business Intelligence<br />
Hands-On Labs: SQL Server 2012 Database Engine<br />
Hands-On Labs: Visual Studio 2010 and .NET 4.0<br />
Hands-On Labs: SQL Server 2012 Enterprise Information Management<br />
Hands-On Labs: SQL Server 2012 Business Intelligence<br />
Hands-On LabsHands-On Labs: Windows Azure and SQL Azure</p>
<p style="text-align:justify;">As I said, if you have not downloaded this so far, it is never late to explore it. Trust me you will atleast learn one thing if you just explore the content.</p>
<p style="text-align:justify;">Reference: <strong>Pinal Dave (<a href="http://blog.sqlauthority.com/" target="_blank">http://blog.sqlauthority.com</a>)</strong></p>
<br />Filed under: <a href='http://blog.sqlauthority.com/category/developer-training/'>Developer Training</a>, <a href='http://blog.sqlauthority.com/category/technology/postaday/'>PostADay</a>, <a href='http://blog.sqlauthority.com/category/technology/sql/'>SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-authority/'>SQL Authority</a>, <a href='http://blog.sqlauthority.com/category/sql-documentation/'>SQL Documentation</a>, <a href='http://blog.sqlauthority.com/category/sql-download/'>SQL Download</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-query/'>SQL Query</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-server/'>SQL Server</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-tips-and-tricks/'>SQL Tips and Tricks</a>, <a href='http://blog.sqlauthority.com/category/sqlauthority/sqlauthority-news/'>SQLAuthority News</a>, <a href='http://blog.sqlauthority.com/category/technology/t-sql/'>T SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/'>Technology</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqlauthority.wordpress.com/18614/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqlauthority.wordpress.com/18614/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqlauthority.wordpress.com/18614/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqlauthority.wordpress.com/18614/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sqlauthority.wordpress.com/18614/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sqlauthority.wordpress.com/18614/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sqlauthority.wordpress.com/18614/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sqlauthority.wordpress.com/18614/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqlauthority.wordpress.com/18614/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqlauthority.wordpress.com/18614/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqlauthority.wordpress.com/18614/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqlauthority.wordpress.com/18614/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqlauthority.wordpress.com/18614/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqlauthority.wordpress.com/18614/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&#038;blog=668536&#038;post=18614&#038;subd=sqlauthority&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.sqlauthority.com/2012/05/12/sql-server-developer-training-kit-for-sql-server-2012/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aa5a2264e8a27d802bb22ab6ccf688?s=96&#38;d=identicon" medium="image">
			<media:title type="html">pinaldave</media:title>
		</media:content>
	</item>
		<item>
		<title>SQL SERVER &#8211; Quiz and Video &#8211; Introduction to Discovering XML Data Type Methods</title>
		<link>http://blog.sqlauthority.com/2012/05/11/sql-server-quiz-and-video-introduction-to-discovering-xml-data-type-methods/</link>
		<comments>http://blog.sqlauthority.com/2012/05/11/sql-server-quiz-and-video-introduction-to-discovering-xml-data-type-methods/#comments</comments>
		<pubDate>Fri, 11 May 2012 01:30:42 +0000</pubDate>
		<dc:creator>pinaldave</dc:creator>
				<category><![CDATA[Joes 2 Pros]]></category>
		<category><![CDATA[PostADay]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Authority]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[T SQL]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=18585</guid>
		<description><![CDATA[This blog post is inspired from SQL Interoperability Joes 2 Pros: A Guide to Integrating SQL Server with XML, C#, and PowerShell – SQL Exam Prep Series 70-433 – Volume 5. [Amazon] &#124; [Flipkart] &#124; [Kindle] &#124; [IndiaPlaza] This is follow up blog post of my earlier blog post on the same subject - SQL SERVER – Introduction [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&#038;blog=668536&#038;post=18585&#038;subd=sqlauthority&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div>
<p style="text-align:justify;">This blog post is inspired from <strong><a title="Permanent Link to SQL Interoperability Joes 2 Pros: A Guide to Integrating SQL Server with XML, C#, and PowerShell  – SQL Exam Prep Series 70-433 – Volume 5" href="http://blog.sqlauthority.com/sql-server-books/sql-interoperability-joes-2-pros-a-guide-to-integrating-sql-server-with-xml-c-and-powershell-sql-exam-prep-series-70-433-volume-5/" rel="bookmark">SQL Interoperability Joes 2 Pros: A Guide to Integrating SQL Server with XML, C#, and PowerShell – SQL Exam Prep Series 70-433 – Volume 5</a></strong>.</p>
<p style="text-align:justify;"><strong>[<a href="http://amzn.to/j2p-5" target="_blank">Amazon</a>] | [<a href="http://bit.ly/pinalbook5" target="_blank">Flipkart</a>] | [<a href="http://amzn.to/sqlbook5onkindle" target="_blank">Kindle</a>] | [<a href="http://bit.ly/ip-j2p-5" target="_blank">IndiaPlaza</a>]</strong></p>
</div>
<p style="text-align:justify;">This is follow up blog post of my earlier blog post on the same subject - <strong><a href="http://blog.sqlauthority.com/2012/04/27/sql-server-introduction-to-discovering-xml-data-type-methods-a-primer/">SQL SERVER – Introduction to Discovering XML Data Type Methods – A Primer</a></strong>. In the article we discussed various basics terminology of the XML. The article further covers following important concepts of XML.</p>
<ul style="text-align:justify;">
<li>What are XML Data Type Methods</li>
<li>The query() Method</li>
<li>The value() Method</li>
<li>The exist() Method</li>
<li>The modify() Method</li>
</ul>
<p style="text-align:justify;">Above five are the most important concepts related to XML and SQL Server. There are many more things one has to learn but without beginners fundamentals one can&#8217;t learn the advanced  concepts. Let us have small quiz and check how many of you get the fundamentals right.</p>
<h3 style="text-align:justify;">Quiz</h3>
<p style="text-align:justify;"><strong>1.) Which method returns an XML fragment from the source XML?</strong></p>
<ol style="text-align:justify;">
<li>query( )</li>
<li>value( )</li>
<li>exist( )</li>
<li>modify( )</li>
<li>All of them</li>
<li>Only query( ) and value( )</li>
</ol>
<p style="text-align:justify;"><strong>2.) Which XML data type method returns a “1” if found and “0” if the specified XPath is not found in the source XML?</strong></p>
<ol style="text-align:justify;">
<li>query( )</li>
<li>value( )</li>
<li>exist( )</li>
<li>modify( )</li>
<li>All of them</li>
<li>Only query( ) and value( )</li>
</ol>
<p style="text-align:justify;"><strong>3.) Which XML data type method allows you to pick the data type of the value that is returned from the source XML?</strong></p>
<ol style="text-align:justify;">
<li>query( )</li>
<li>value( )</li>
<li>exist( )</li>
<li>modify( )</li>
<li>All of them</li>
<li>Only query( ) and value( )</li>
</ol>
<p style="text-align:justify;"><strong>4.) Which method will not work with a SQL SELECT statement?</strong></p>
<ol style="text-align:justify;">
<li>query( )</li>
<li>value( )</li>
<li>exist( )</li>
<li>modify( )</li>
<li>All of them</li>
<li>Only query( ) and value( )</li>
</ol>
<p style="text-align:justify;">Now make sure that you write down all the answers on the piece of paper.</p>
<div style="text-align:justify;">
<p>Watch following video and read earlier article over here. If you want to change the answer you still have chance.</p>
<span class='embed-youtube' style='text-align:center; display: block;'><iframe class='youtube-player' type='text/html' width='500' height='312' src='http://www.youtube.com/embed/0g61qFIOL0o?version=3&#038;rel=1&#038;fs=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;wmode=transparent' frameborder='0'></iframe></span>
<h3>Solution</h3>
<p>1) 1</p>
<p>2) 3</p>
<p>3) 2</p>
<p>4) 4</p>
<p>Now compare let us check the answers and compare your answers to following answers. I am very confident you will get them correct.</p>
</div>
<h3 style="text-align:justify;"><a href="http://blog.sqlauthority.com/sql-server-books/sql-joes-2-pros-five-book-combo-list-of-best-sql-server-books/"><img class="alignleft" src="http://www.pinaldave.com/bimg/j2pimages/combos.png" alt="" width="250" height="160" /></a></h3>
<div style="text-align:justify;">
<p><strong>Available at</strong></p>
<p><strong>USA: <a href="http://amzn.to/sqlfiveamazon" target="_blank">Amazon</a></strong></p>
<p><strong>India: <a href="http://bit.ly/sqlfiveflipkart" target="_blank">Flipkart </a>| <a href="http://bit.ly/ip-fivebooks" target="_blank">IndiaPlaza</a></strong></p>
<p><strong>Volume: <a href="http://bit.ly/sa-book1" target="_blank">1</a>, <a href="http://bit.ly/sa-book2" target="_blank">2</a>, <a href="http://bit.ly/sa-book3" target="_blank">3</a>, <a href="http://bit.ly/sa-book4" target="_blank">4</a>, <a href="http://bit.ly/sa-book5" target="_blank">5</a></strong></p>
<p>Please leave your feedback in the comment area for the quiz and video. Did you know all the answers of the quiz?</p>
</div>
<p style="text-align:justify;">Reference: <strong>Pinal Dave (<a href="http://blog.sqlauthority.com/" target="_blank">http://blog.sqlauthority.com</a>)</strong></p>
<br />Filed under: <a href='http://blog.sqlauthority.com/category/joes-2-pros/'>Joes 2 Pros</a>, <a href='http://blog.sqlauthority.com/category/technology/postaday/'>PostADay</a>, <a href='http://blog.sqlauthority.com/category/technology/sql/'>SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-authority/'>SQL Authority</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-query/'>SQL Query</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-server/'>SQL Server</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-tips-and-tricks/'>SQL Tips and Tricks</a>, <a href='http://blog.sqlauthority.com/category/technology/t-sql/'>T SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/'>Technology</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqlauthority.wordpress.com/18585/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqlauthority.wordpress.com/18585/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqlauthority.wordpress.com/18585/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqlauthority.wordpress.com/18585/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sqlauthority.wordpress.com/18585/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sqlauthority.wordpress.com/18585/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sqlauthority.wordpress.com/18585/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sqlauthority.wordpress.com/18585/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqlauthority.wordpress.com/18585/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqlauthority.wordpress.com/18585/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqlauthority.wordpress.com/18585/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqlauthority.wordpress.com/18585/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqlauthority.wordpress.com/18585/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqlauthority.wordpress.com/18585/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&#038;blog=668536&#038;post=18585&#038;subd=sqlauthority&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.sqlauthority.com/2012/05/11/sql-server-quiz-and-video-introduction-to-discovering-xml-data-type-methods/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aa5a2264e8a27d802bb22ab6ccf688?s=96&#38;d=identicon" medium="image">
			<media:title type="html">pinaldave</media:title>
		</media:content>

		<media:content url="http://www.pinaldave.com/bimg/j2pimages/combos.png" medium="image" />
	</item>
		<item>
		<title>SQL SERVER &#8211; Quiz and Video &#8211; Introduction to SQL Error Actions</title>
		<link>http://blog.sqlauthority.com/2012/05/10/sql-server-quiz-and-video-introduction-to-sql-error-actions/</link>
		<comments>http://blog.sqlauthority.com/2012/05/10/sql-server-quiz-and-video-introduction-to-sql-error-actions/#comments</comments>
		<pubDate>Thu, 10 May 2012 01:30:26 +0000</pubDate>
		<dc:creator>pinaldave</dc:creator>
				<category><![CDATA[Joes 2 Pros]]></category>
		<category><![CDATA[PostADay]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Authority]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[T SQL]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=18573</guid>
		<description><![CDATA[This blog post is inspired from SQL Programming Joes 2 Pros: Programming and Development for Microsoft SQL Server 2008 – SQL Exam Prep Series 70-433 – Volume 4. [Amazon] &#124; [Flipkart] &#124; [Kindle] &#124; [IndiaPlaza] This is follow up blog post of my earlier blog post on the same subject - SQL SERVER – Introduction to SQL Error [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&#038;blog=668536&#038;post=18573&#038;subd=sqlauthority&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div>
<p style="text-align:justify;">This blog post is inspired from <strong><a title="Permanent Link to SQL Programming Joes 2 Pros: Programming and Development for Microsoft SQL Server 2008 – SQL Exam Prep Series 70-433 – Volume 4" href="http://blog.sqlauthority.com/sql-server-books/sql-programming-joes-2-pros-programming-and-development-for-microsoft-sql-server-2008-sql-exam-prep-series-70-433-volume-4/" rel="bookmark">SQL Programming Joes 2 Pros: Programming and Development for Microsoft SQL Server 2008 – SQL Exam Prep Series 70-433 – Volume 4</a></strong>.</p>
<p style="text-align:justify;"><strong>[<a href="http://amzn.to/j2p-4" target="_blank">Amazon</a>] | [<a href="http://bit.ly/pinalbook4" target="_blank">Flipkart</a>] | [<a href="http://amzn.to/sqlbook4onkindle" target="_blank">Kindle</a>] | [<a href="http://bit.ly/ip-j2p-4" target="_blank">IndiaPlaza</a>]</strong></p>
</div>
<p style="text-align:justify;">This is follow up blog post of my earlier blog post on the same subject - <strong><a href="http://blog.sqlauthority.com/2012/04/26/sql-server-introduction-to-sql-error-actions-a-primer/">SQL SERVER – Introduction to SQL Error Actions – A Primer</a></strong>. In the article we discussed various basics terminology of the error handling. The article further covers following important concepts of error handling.</p>
<ul style="text-align:justify;">
<li>Introduction to SQL Error Actions</li>
<li>Statement Termination</li>
<li>Scope Abortion</li>
<li>Batch Termination</li>
</ul>
<p style="text-align:justify;">Above three are the most important concepts related to error handling and SQL Server.  There are many more things one has to learn but without beginners fundamentals one can&#8217;t learn the advanced concepts. Let us have small quiz and check how many of you get the fundamentals right.</p>
<h3 style="text-align:justify;">Quiz</h3>
<p style="text-align:justify;"><strong>1.) Which SQL Server error action happens for errors with a severity of 11-16 when you set the XACT_ABORT setting to ON?</strong></p>
<ol style="text-align:justify;">
<li>You will get Statement Termination.</li>
<li>You will get Scope Abortion.</li>
<li>You will get Batch Abortion.</li>
<li>You will get Connection Termination.</li>
<li>SQL Server will pick the error action.</li>
</ol>
<p style="text-align:justify;"><strong>2.) Which SQL Server error action happens for errors with a severity of 11-16 when you set the XACT_ABORT setting to OFF?</strong></p>
<ol style="text-align:justify;">
<li>You will get Statement Termination</li>
<li>You will get Scope Abortion</li>
<li>You will get Batch Abortion</li>
<li>You will get Connection Termination</li>
<li>SQL Server will pick the error action</li>
</ol>
<div style="text-align:justify;">
<p>Now make sure that you write down all the answers on the piece of paper.</p>
<p>Watch following video and read earlier article over here. If you want to change the answer you still have chance.</p>
<span class='embed-youtube' style='text-align:center; display: block;'><iframe class='youtube-player' type='text/html' width='500' height='312' src='http://www.youtube.com/embed/fPjOhr3b5Pk?version=3&#038;rel=1&#038;fs=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;wmode=transparent' frameborder='0'></iframe></span>
<h3>Solution</h3>
<p>1) 3</p>
<p>2) 5</p>
<p>Now compare let us check the answers and compare your answers to following answers. I am very confident you will get them correct.</p>
</div>
<h3 style="text-align:justify;"><a href="http://blog.sqlauthority.com/sql-server-books/sql-joes-2-pros-five-book-combo-list-of-best-sql-server-books/"><img class="alignleft" src="http://www.pinaldave.com/bimg/j2pimages/combos.png" alt="" width="250" height="160" /></a></h3>
<div style="text-align:justify;">
<p><strong>Available at</strong></p>
<p><strong>USA: <a href="http://amzn.to/sqlfiveamazon" target="_blank">Amazon</a></strong></p>
<p><strong>India: <a href="http://bit.ly/sqlfiveflipkart" target="_blank">Flipkart </a>| <a href="http://bit.ly/ip-fivebooks" target="_blank">IndiaPlaza</a></strong></p>
<p><strong>Volume: <a href="http://bit.ly/sa-book1" target="_blank">1</a>, <a href="http://bit.ly/sa-book2" target="_blank">2</a>, <a href="http://bit.ly/sa-book3" target="_blank">3</a>, <a href="http://bit.ly/sa-book4" target="_blank">4</a>, <a href="http://bit.ly/sa-book5" target="_blank">5</a></strong></p>
<p>Please leave your feedback in the comment area for the quiz and video. Did you know all the answers of the quiz?</p>
</div>
<p style="text-align:justify;">Reference: <strong>Pinal Dave (<a href="http://blog.sqlauthority.com/" target="_blank">http://blog.sqlauthority.com</a>)</strong></p>
<br />Filed under: <a href='http://blog.sqlauthority.com/category/joes-2-pros/'>Joes 2 Pros</a>, <a href='http://blog.sqlauthority.com/category/technology/postaday/'>PostADay</a>, <a href='http://blog.sqlauthority.com/category/technology/sql/'>SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-authority/'>SQL Authority</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-query/'>SQL Query</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-server/'>SQL Server</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-tips-and-tricks/'>SQL Tips and Tricks</a>, <a href='http://blog.sqlauthority.com/category/technology/t-sql/'>T SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/'>Technology</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqlauthority.wordpress.com/18573/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqlauthority.wordpress.com/18573/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqlauthority.wordpress.com/18573/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqlauthority.wordpress.com/18573/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sqlauthority.wordpress.com/18573/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sqlauthority.wordpress.com/18573/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sqlauthority.wordpress.com/18573/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sqlauthority.wordpress.com/18573/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqlauthority.wordpress.com/18573/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqlauthority.wordpress.com/18573/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqlauthority.wordpress.com/18573/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqlauthority.wordpress.com/18573/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqlauthority.wordpress.com/18573/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqlauthority.wordpress.com/18573/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&#038;blog=668536&#038;post=18573&#038;subd=sqlauthority&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.sqlauthority.com/2012/05/10/sql-server-quiz-and-video-introduction-to-sql-error-actions/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aa5a2264e8a27d802bb22ab6ccf688?s=96&#38;d=identicon" medium="image">
			<media:title type="html">pinaldave</media:title>
		</media:content>

		<media:content url="http://www.pinaldave.com/bimg/j2pimages/combos.png" medium="image" />
	</item>
		<item>
		<title>SQL SERVER &#8211; Quiz and Video &#8211; Introduction to Basics of a Query Hint</title>
		<link>http://blog.sqlauthority.com/2012/05/09/sql-server-quiz-and-video-introduction-to-basics-of-a-query-hint/</link>
		<comments>http://blog.sqlauthority.com/2012/05/09/sql-server-quiz-and-video-introduction-to-basics-of-a-query-hint/#comments</comments>
		<pubDate>Wed, 09 May 2012 01:30:42 +0000</pubDate>
		<dc:creator>pinaldave</dc:creator>
				<category><![CDATA[Joes 2 Pros]]></category>
		<category><![CDATA[PostADay]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Authority]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[T SQL]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=18560</guid>
		<description><![CDATA[This blog post is inspired from SQL Architecture Basics Joes 2 Pros: Core Architecture concepts – SQL Exam Prep Series 70-433 – Volume 3. [Amazon] &#124; [Flipkart] &#124; [Kindle] &#124; [IndiaPlaza] This is follow up blog post of my earlier blog post on the same subject - SQL SERVER – Introduction to Basics of a Query Hint – [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&#038;blog=668536&#038;post=18560&#038;subd=sqlauthority&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div>
<p>This blog post is inspired from <strong><a title="Permanent Link to SQL Architecture Basics Joes 2 Pros: Core Architecture concepts – SQL Exam Prep Series 70-433 – Volume 3" href="http://blog.sqlauthority.com/sql-server-books/sql-architecture-basics-joes-2-pros-core-architecture-concepts-sql-exam-prep-series-70-433-volume-3/" rel="bookmark">SQL Architecture Basics Joes 2 Pros: Core Architecture concepts – SQL Exam Prep Series 70-433 – Volume 3</a></strong>.</p>
<p><strong>[<a href="http://amzn.to/j2p-3" target="_blank">Amazon</a>] | [<a href="http://bit.ly/pinalbook3" target="_blank">Flipkart</a>] | [<a href="http://amzn.to/sqlbook3onkindle" target="_blank">Kindle</a>] | [<a href="http://bit.ly/ip-j2p-3" target="_blank">IndiaPlaza</a>]</strong></p>
</div>
<p style="text-align:justify;">This is follow up blog post of my earlier blog post on the same subject - <strong><a href="http://blog.sqlauthority.com/2012/04/25/sql-server-introduction-to-basics-of-a-query-hint-a-primer/" target="_blank">SQL SERVER – Introduction to Basics of a Query Hint – A Primer</a></strong>. In the article we discussed various basics terminology of the query hints. The article further covers following important concepts of query hints.</p>
<ul style="text-align:justify;">
<li>Expecting Seek and getting a Scan</li>
<li>Creating an index for improved optimization</li>
<li>Implementing the query hint</li>
</ul>
<p style="text-align:justify;">Above three are the most important concepts related to query hint and SQL Server.  There are many more things one has to learn but without beginners fundamentals one can&#8217;t learn the advanced  concepts. Let us have small quiz and check how many of you get the fundamentals right.</p>
<h3 style="text-align:justify;">Quiz</h3>
<p style="text-align:justify;"><strong>1) You have the following query:</strong></p>
<p><strong>DECLARE @UlaChoice TinyInt</strong><br />
<strong> SET @Type = 1</strong><br />
<strong> SELECT *</strong><br />
<strong> FROM LegalActivity</strong><br />
<strong> WHERE UlaChoice = @UlaChoice</strong></p>
<p><strong>You have a nonclustered index named IX_Legal_Ula on the UlaChoice field. The Primary key is on the ID field and called PK_Legal_ID 99% of the time the value of the @UlaChoice is set to &#8216;YP101&#8242;. What query will achieve the best optimization for this query?</strong></p>
<ol>
<li>SELECT *<br />
FROM LegalActivity<br />
WHERE UlaChoice = @UlaChoice<br />
WITH(INDEX(X_Legal_Ula))</li>
<li>SELECT *<br />
FROM LegalActivity<br />
WHERE UlaChoice = @UlaChoice<br />
WITH(INDEX(PK_Legal_ID))</li>
<li>SELECT *<br />
FROM LegalActivity<br />
WHERE UlaChoice = @UlaChoice<br />
OPTION (Optimize FOR(@UlaChoice = &#8216;YP101&#8242;))</li>
</ol>
<p style="text-align:justify;"><strong>2) You have the following query:</strong></p>
<p><strong>SELECT *</strong><br />
<strong> FROM CurrentProducts</strong><br />
<strong> WHERE ShortName = &#8216;Yoga Trip&#8217;</strong></p>
<p><strong>You have a nonclustered index on the ShortName field and the query runs an efficient index seek. You change your query to use a variable for ShortName and now you are using a slow index scan.</strong></p>
<p><strong>What query hint can you use to get the same execution time as before?</strong></p>
<ol>
<li>WITH</li>
<li>LOCK</li>
<li>FAST</li>
<li>OPTIMIZE FOR</li>
<li>MAXDOP</li>
<li>READONLY</li>
</ol>
<div style="text-align:justify;">
<p>Now make sure that you write down all the answers on the piece of paper.</p>
<p>Watch following video and read earlier article over here. If you want to change the answer you still have chance.</p>
<span class='embed-youtube' style='text-align:center; display: block;'><iframe class='youtube-player' type='text/html' width='500' height='312' src='http://www.youtube.com/embed/0GTeUHkdZtc?version=3&#038;rel=1&#038;fs=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;wmode=transparent' frameborder='0'></iframe></span>
<h3>Solution</h3>
<p>1) 3</p>
<p>2) 4</p>
<p>Now compare let us check the answers and compare your answers to following answers. I am very confident you will get them correct.</p>
</div>
<h3 style="text-align:justify;"><a href="http://blog.sqlauthority.com/sql-server-books/sql-joes-2-pros-five-book-combo-list-of-best-sql-server-books/"><img class="alignleft" src="http://www.pinaldave.com/bimg/j2pimages/combos.png" alt="" width="250" height="160" /></a></h3>
<div style="text-align:justify;">
<p><strong>Available at</strong></p>
<p><strong>USA: <a href="http://amzn.to/sqlfiveamazon" target="_blank">Amazon</a></strong></p>
<p><strong>India: <a href="http://bit.ly/sqlfiveflipkart" target="_blank">Flipkart </a>| <a href="http://bit.ly/ip-fivebooks" target="_blank">IndiaPlaza</a></strong></p>
<p><strong>Volume: <a href="http://bit.ly/sa-book1" target="_blank">1</a>, <a href="http://bit.ly/sa-book2" target="_blank">2</a>, <a href="http://bit.ly/sa-book3" target="_blank">3</a>, <a href="http://bit.ly/sa-book4" target="_blank">4</a>, <a href="http://bit.ly/sa-book5" target="_blank">5</a></strong></p>
<p>Please leave your feedback in the comment area for the quiz and video. Did you know all the answers of the quiz?</p>
</div>
<p style="text-align:justify;">Reference: <strong>Pinal Dave (<a href="http://blog.sqlauthority.com/" target="_blank">http://blog.sqlauthority.com</a>)</strong></p>
<br />Filed under: <a href='http://blog.sqlauthority.com/category/joes-2-pros/'>Joes 2 Pros</a>, <a href='http://blog.sqlauthority.com/category/technology/postaday/'>PostADay</a>, <a href='http://blog.sqlauthority.com/category/technology/sql/'>SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-authority/'>SQL Authority</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-query/'>SQL Query</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-server/'>SQL Server</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-tips-and-tricks/'>SQL Tips and Tricks</a>, <a href='http://blog.sqlauthority.com/category/technology/t-sql/'>T SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/'>Technology</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqlauthority.wordpress.com/18560/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqlauthority.wordpress.com/18560/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqlauthority.wordpress.com/18560/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqlauthority.wordpress.com/18560/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sqlauthority.wordpress.com/18560/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sqlauthority.wordpress.com/18560/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sqlauthority.wordpress.com/18560/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sqlauthority.wordpress.com/18560/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqlauthority.wordpress.com/18560/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqlauthority.wordpress.com/18560/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqlauthority.wordpress.com/18560/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqlauthority.wordpress.com/18560/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqlauthority.wordpress.com/18560/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqlauthority.wordpress.com/18560/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&#038;blog=668536&#038;post=18560&#038;subd=sqlauthority&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.sqlauthority.com/2012/05/09/sql-server-quiz-and-video-introduction-to-basics-of-a-query-hint/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aa5a2264e8a27d802bb22ab6ccf688?s=96&#38;d=identicon" medium="image">
			<media:title type="html">pinaldave</media:title>
		</media:content>

		<media:content url="http://www.pinaldave.com/bimg/j2pimages/combos.png" medium="image" />
	</item>
		<item>
		<title>SQL SERVER &#8211; Quiz and Video &#8211; Introduction to Hierarchical Query using a Recursive CTE</title>
		<link>http://blog.sqlauthority.com/2012/05/08/sql-server-quiz-and-video-introduction-to-hierarchical-query-using-a-recursive-cte/</link>
		<comments>http://blog.sqlauthority.com/2012/05/08/sql-server-quiz-and-video-introduction-to-hierarchical-query-using-a-recursive-cte/#comments</comments>
		<pubDate>Tue, 08 May 2012 01:30:29 +0000</pubDate>
		<dc:creator>pinaldave</dc:creator>
				<category><![CDATA[Joes 2 Pros]]></category>
		<category><![CDATA[PostADay]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Authority]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[T SQL]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=18546</guid>
		<description><![CDATA[This blog post is inspired from SQL Queries Joes 2 Pros: SQL Query Techniques For Microsoft SQL Server 2008 – SQL Exam Prep Series 70-433 – Volume 2.[Amazon] &#124; [Flipkart] &#124; [Kindle] &#124; [IndiaPlaza] This is follow up blog post of my earlier blog post on the same subject - SQL SERVER – Introduction to Hierarchical Query using [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&#038;blog=668536&#038;post=18546&#038;subd=sqlauthority&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div>This blog post is inspired from <strong><a title="Permanent Link to SQL Queries Joes 2 Pros: SQL Query Techniques For Microsoft SQL Server 2008 – SQL Exam Prep Series 70-433 – Volume 2" href="http://blog.sqlauthority.com/sql-server-books/sql-queries-joes-2-pros-sql-query-techniques-for-microsoft-sql-server-2008-sql-exam-prep-series-70-433-volume-2/" rel="bookmark">SQL Queries Joes 2 Pros: SQL Query Techniques For Microsoft SQL Server 2008 – SQL Exam Prep Series 70-433 – Volume 2</a></strong>.<strong>[<a href="http://amzn.to/j2p-1" target="_blank">Amazon</a>] | [<a href="http://bit.ly/pinalbook1" target="_blank">Flipkart</a>] | [<a href="http://amzn.to/sqlbook1onkindle" target="_blank">Kindle</a>] | [<a href="http://bit.ly/ip-j2p-1" target="_blank">IndiaPlaza</a>]</strong></div>
<p style="text-align:justify;">This is follow up blog post of my earlier blog post on the same subject - <strong><a href="http://blog.sqlauthority.com/2012/04/24/sql-server-introduction-to-hierarchical-query-using-a-recursive-cte-a-primer/">SQL SERVER – Introduction to Hierarchical Query using a Recursive CTE – A Primer</a></strong>. In the article we discussed various basics terminology of the CTE. The article further covers following important concepts of common table expression.</p>
<ul style="text-align:justify;">
<li>What is a Common Table Expression (CTE)</li>
<li>Building a Recursive CTE</li>
<li>Identify the Anchor and Recursive Query</li>
<li>Add the Anchor and Recursive query to a CTE</li>
<li>Add an expression to track hierarchical level</li>
<li>Add a self-referencing INNER JOIN statement</li>
</ul>
<p style="text-align:justify;">Above six are the most important concepts related to CTE and SQL Server.  There are many more things one has to learn but without beginners fundamentals one can&#8217;t learn the advanced  concepts. Let us have small quiz and check how many of you get the fundamentals right.</p>
<h3 style="text-align:justify;">Quiz</h3>
<p><strong>1) You have an employee table with the following data.</strong></p>
<table width="238" border="1" cellspacing="0" cellpadding="0">
<col width="47" />
<col width="71" />
<col width="75" />
<col width="45" />
<tbody>
<tr>
<td width="47" height="20"><strong>EmpID</strong></td>
<td width="71"><strong>FirstName</strong></td>
<td width="75"><strong>LastName</strong></td>
<td width="45"><strong>MgrID</strong></td>
</tr>
<tr>
<td height="20">1</td>
<td>David</td>
<td>Kennson</td>
<td>11</td>
</tr>
<tr>
<td height="20">2</td>
<td>Eric</td>
<td>Bender</td>
<td>11</td>
</tr>
<tr>
<td height="20">3</td>
<td>Lisa</td>
<td>Kendall</td>
<td>4</td>
</tr>
<tr>
<td height="20">4</td>
<td>David</td>
<td>Lonning</td>
<td>11</td>
</tr>
<tr>
<td height="20">5</td>
<td>John</td>
<td>Marshbank</td>
<td>4</td>
</tr>
<tr>
<td height="20">6</td>
<td>James</td>
<td>Newton</td>
<td>3</td>
</tr>
<tr>
<td height="20">7</td>
<td>Sally</td>
<td>Smith</td>
<td>NULL</td>
</tr>
</tbody>
</table>
<p>You need to write a recursive CTE that shows the EmpID, FirstName, LastName, MgrID, and employee level. The CEO should be listed at Level 1. All people who work for the CEO will be listed at Level 2. All of the people who work for those people will be listed at Level 3. Which CTE code will achieve this result?</p>
<ol>
<li>WITH EmpList AS<br />
(SELECT Boss.EmpID, Boss.FName, Boss.LName, Boss.MgrID,<br />
1 AS Lvl<br />
FROM Employee AS Boss WHERE Boss.MgrID IS NULL<br />
UNION ALL<br />
SELECT E.EmpID, E.FirstName, E.LastName, E.MgrID, EmpList.Lvl + 1<br />
FROM Employee AS E INNER JOIN EmpList<br />
ON E.MgrID = EmpList.EmpID)<br />
SELECT * FROM EmpList</li>
<li>WITH EmpListAS<br />
(SELECT EmpID, FirstName, LastName, MgrID, 1 as Lvl<br />
FROM Employee WHERE MgrID IS NULL<br />
UNION ALL<br />
SELECT EmpID, FirstName, LastName, MgrID, 2 as Lvl )<br />
SELECT * FROM BossList</li>
<li>WITH EmpList AS<br />
(SELECT EmpID, FirstName, LastName, MgrID, 1 as Lvl<br />
FROM Employee WHERE MgrID is NOT NULL<br />
UNION<br />
SELECT EmpID, FirstName, LastName, MgrID, BossList.Lvl + 1<br />
FROM Employee INNER JOIN EmpList BossList<br />
ON Employee.MgrID = BossList.EmpID)<br />
SELECT * FROM EmpList</li>
</ol>
<p><strong>2) You have a table named Employee. The EmployeeID of each employee&#8217;s manager is in the ManagerID column. You need to write a recursive query that produces a list of employees and their manager. The query must also include the employee&#8217;s level in the hierarchy.</strong> <strong>You write the following code segment:</strong></p>
<p><strong>WITH EmployeeList (EmployeeID, FullName, ManagerName, Level)<br />
</strong><strong>AS (<br />
</strong><strong>&#8211;PICK ANSWER CODE HERE<br />
</strong><strong>)</strong></p>
<ol>
<li>SELECT EmployeeID, FullName, &#8221; AS [ManagerID], 1 AS [Level]<br />
FROM Employee<br />
WHERE ManagerID IS NULL<br />
UNION ALL<br />
SELECT emp.EmployeeID, emp.FullName mgr.FullName, 1 + 1 AS [Level]<br />
FROM Employee emp JOIN Employee mgr<br />
ON emp.ManagerID = mgr.EmployeeId</li>
<li>SELECT EmployeeID, FullName, &#8221; AS [ManagerID], 1 AS [Level]<br />
FROM Employee<br />
WHERE ManagerID IS NULL<br />
UNION ALL<br />
SELECT emp.EmployeeID, emp.FullName, mgr.FullName, mgr.Level + 1<br />
FROM EmployeeList mgr JOIN Employee emp<br />
ON emp.ManagerID = mgr.EmployeeId</li>
</ol>
<div style="text-align:justify;">
<p>Now make sure that you write down all the answers on the piece of paper.</p>
<p>Watch following video and read earlier article over here. If you want to change the answer you still have chance.</p>
<span class='embed-youtube' style='text-align:center; display: block;'><iframe class='youtube-player' type='text/html' width='500' height='312' src='http://www.youtube.com/embed/fbOGQlkFVqI?version=3&#038;rel=1&#038;fs=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;wmode=transparent' frameborder='0'></iframe></span>
<h3>Solution</h3>
<p>1) 1</p>
<p>2) 2</p>
<p>Now compare let us check the answers and compare your answers to following answers. I am very confident you will get them correct.</p>
</div>
<h3 style="text-align:justify;"><a href="http://blog.sqlauthority.com/sql-server-books/sql-joes-2-pros-five-book-combo-list-of-best-sql-server-books/"><img class="alignleft" src="http://www.pinaldave.com/bimg/j2pimages/combos.png" alt="" width="250" height="160" /></a></h3>
<div style="text-align:justify;">
<p><strong>Available at</strong></p>
<p><strong>USA: <a href="http://amzn.to/sqlfiveamazon" target="_blank">Amazon</a></strong></p>
<p><strong>India: <a href="http://bit.ly/sqlfiveflipkart" target="_blank">Flipkart </a>| <a href="http://bit.ly/ip-fivebooks" target="_blank">IndiaPlaza</a></strong></p>
<p><strong>Volume: <a href="http://bit.ly/sa-book1" target="_blank">1</a>, <a href="http://bit.ly/sa-book2" target="_blank">2</a>, <a href="http://bit.ly/sa-book3" target="_blank">3</a>, <a href="http://bit.ly/sa-book4" target="_blank">4</a>, <a href="http://bit.ly/sa-book5" target="_blank">5</a></strong></p>
<p>Please leave your feedback in the comment area for the quiz and video. Did you know all the answers of the quiz?</p>
</div>
<p style="text-align:justify;">Reference: <strong>Pinal Dave (<a href="http://blog.sqlauthority.com/" target="_blank">http://blog.sqlauthority.com</a>)</strong></p>
<br />Filed under: <a href='http://blog.sqlauthority.com/category/joes-2-pros/'>Joes 2 Pros</a>, <a href='http://blog.sqlauthority.com/category/technology/postaday/'>PostADay</a>, <a href='http://blog.sqlauthority.com/category/technology/sql/'>SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-authority/'>SQL Authority</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-query/'>SQL Query</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-server/'>SQL Server</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-tips-and-tricks/'>SQL Tips and Tricks</a>, <a href='http://blog.sqlauthority.com/category/technology/t-sql/'>T SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/'>Technology</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqlauthority.wordpress.com/18546/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqlauthority.wordpress.com/18546/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqlauthority.wordpress.com/18546/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqlauthority.wordpress.com/18546/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sqlauthority.wordpress.com/18546/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sqlauthority.wordpress.com/18546/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sqlauthority.wordpress.com/18546/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sqlauthority.wordpress.com/18546/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqlauthority.wordpress.com/18546/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqlauthority.wordpress.com/18546/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqlauthority.wordpress.com/18546/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqlauthority.wordpress.com/18546/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqlauthority.wordpress.com/18546/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqlauthority.wordpress.com/18546/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&#038;blog=668536&#038;post=18546&#038;subd=sqlauthority&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.sqlauthority.com/2012/05/08/sql-server-quiz-and-video-introduction-to-hierarchical-query-using-a-recursive-cte/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aa5a2264e8a27d802bb22ab6ccf688?s=96&#38;d=identicon" medium="image">
			<media:title type="html">pinaldave</media:title>
		</media:content>

		<media:content url="http://www.pinaldave.com/bimg/j2pimages/combos.png" medium="image" />
	</item>
	</channel>
</rss>
