<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Made2Mentor</title>
	
	<link>http://www.made2mentor.com</link>
	<description>Data Warehousing, Microsoft Business Intelligence, and Other Cool Stuff</description>
	<lastBuildDate>Sat, 05 May 2012 21:49:42 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/Made2Mentor" /><feedburner:info uri="made2mentor" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>My Father’s Footsteps</title>
		<link>http://feedproxy.google.com/~r/Made2Mentor/~3/LTWer5rOu2I/</link>
		<comments>http://www.made2mentor.com/2012/04/my-fathers-footsteps/#comments</comments>
		<pubDate>Tue, 17 Apr 2012 18:07:11 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[Health]]></category>
		<category><![CDATA[Rant]]></category>

		<guid isPermaLink="false">http://www.made2mentor.com/?p=6956</guid>
		<description><![CDATA[
			
				
			
		
<p>Everyone has heard the quote, &#8220;The apple never falls far from the tree.&#8221; As we get older, we tend to rebel against the notion that we will eventually become our parents. As we age, it seems less a notion and more a certainty. Well, in many ways I have fought against this my entire life [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.made2mentor.com%2F2012%2F04%2Fmy-fathers-footsteps%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.made2mentor.com%2F2012%2F04%2Fmy-fathers-footsteps%2F&amp;source=Made2Mentor&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>Everyone has heard the quote, &#8220;The apple never falls far from the tree.&#8221; As we get older, we tend to rebel against the notion that we will eventually become our parents. As we age, it seems less a notion and more a certainty. Well, in many ways I have fought against this my entire life because of some of the consequences my father has to endure. Of course, everyone has flaws, and I strive to correct and improve mine all of the time. However, there is one that is threatening to destroy me.</p>
<h3>Pain</h3>
<p>Like my father, <strong>I have been fat for most of my life</strong>. Not just overweight, but fat. I can remember getting into fights with neighbor kids about it. I&#8217;d come home all marked up from a fight and my father would ask me why. &#8220;Because they called you fat,&#8221; I&#8217;d say. And he&#8217;d just respond with, &#8220;David, I am fat. Who cares what they say?&#8221; Well, as a kid, you have to care as teasing and bullying can be brutally painful. Anyway, as I got older my weight continued to grow.  </p>
<p>Being fat is painful. It affects your social life and your career. People assume that if you&#8217;re fat that you&#8217;re undisciplined and discount your intelligence and abilities. I usually don&#8217;t take it personally as it&#8217;s not malicious, it&#8217;s just natural. A few years ago a friend from the PASS community asked me to apply to their company because their team could benefit from my skills. However, the Human Resource person didn&#8217;t recommend me for a second interview. The friend asked why and the HR person stupidly admitted that I was too fat. They didn&#8217;t want to incur extra health care costs and openly doubted my skills. Keep in mind that this is a person charged with protecting employees with disabilities and also has no understand about what DBAs actually do. I was rejected simply because I was fat. I was angry, but got over it. </p>
<p>Dieting is painful, dealing with deprivation, and eventual failure. I&#8217;ve gained and lost tons of weight during long term diet and exercise stints. The most recent was 2 years ago when I lost over 50 lbs. However, I had to ride almost 200 miles a week on the bike to do it. This lead to terrible saddle sores which required periodic surgical procedures to remove. Your body is programmed to hold onto weight and tends to sabotage your efforts. This can be demoralizing.  </p>
<h3>Revelation</h3>
<p><a href="http://www.made2mentor.com/wp-content/uploads/2012/04/mistakesdemotivator.jpg"><img src="http://www.made2mentor.com/wp-content/uploads/2012/04/mistakesdemotivator.jpg" alt="" title="mistakesdemotivator" width="617" height="435" class="aligncenter size-full wp-image-6989" /></a><br />
As time goes on, I&#8217;ve become closer with my father. His health has been declining in the past decade and his obesity and related problems have been devastating. He suffers from diabetes and has impaired vision because of it. My father, who used to throw around 400lb tool boxes with ease can no longer walk. His knees and hips have completely eroded and he&#8217;s confined to a wheelchair or walker and in extreme pain. He&#8217;s on the most powerful pain killers available and still in agony. For the longest time surgeons refused to fix his problems because he &#8220;wouldn&#8217;t&#8221; lose weight. However, its nearly impossible to lose weight when all you can do is lay around.  </p>
<p>A few years ago, before my last dieting and exercising stint, I had a talk with him. Although it may sound weird, I thanked him for being an example for me. My father is like <a href="http://en.wikipedia.org/wiki/Ghost_of_Christmas_Yet_to_Come" title="the Ghost of Christmas Future" target="_blank">the Ghost of Christmas Future</a> for me. I have a living example of what will happen to me if I cannot fix this problem. His response was telling. Basically he apologized for what I have to go through, but that none of us avoids it. His father died of diabetes related complications and presumably his grandfather did as well. My father, who was one of the strongest men I have ever met, apologized because I was doomed to follow his path. </p>
<p>So far, he&#8217;s been right. Despite my best efforts I am still fat, and suffering physically from it. Two months ago I tore the meniscus in my knee when I got up off the couch. Now my knee hurts constantly. <strong>I am becoming my father</strong>. </p>
<p><iframe width="500" height="375" src="http://www.youtube.com/embed/Zjhy51XW9MY?fs=1&#038;feature=oembed" frameborder="0" allowfullscreen></iframe></p>
<p>I simply cannot accept that because it&#8217;s terrifying beyond words. </p>
<h3>My Decision</h3>
<p>I&#8217;m having <a href="http://www.yourbariatricsurgeryguide.com/gastric-sleeve/" title="Gastric Sleeve " target="_blank">Gastric Sleeve Surgery</a>. Basically, they are going to remove 80% of my stomach which reduces the amount of food I can eat as well as suppress my hunger. I&#8217;ll be in the hospital three days and will require some time to heal. The decision is scary and the surgery is painful, but not nearly so as being morbidly obese the rest of my life. </p>
<p>I made the final decision after appointments with a registered dietitian and my physician. Independently they both told me that because my metabolism was so slow, as it is with most morbidly obese people, that I would need to restrict my daily caloric intake to between 800 and 1200 calories for the rest of my life. This is the only way I can remain at a normal weight. When told this, I realized that I should have done this a decade ago. I don&#8217;t know of anyone, even my thinnest friends, who would be able to voluntarily restrict their eating that much. Heck one of my favorite meals, Prime Rib at a national chain restaurant, is at least 1700 calories. I would never be able to achieve this without the benefits of surgery. </p>
<p>I understand that this will permanently alter my relationship with food. The surgery is a tool which will allow me to eat less and stick to the healthy foods which will allow me to avoid this fate. The next year will be very hard, but I simply have to do it.</p>
<p><strong>Why am I sharing all this on my blog?</strong> Well, the surgery is next Monday and I&#8217;m presenting at <a href="http://www.sqlsaturday.com/107/eventhome.aspx" title="SQL Saturday Houston " target="_blank">SQL Saturday Houston</a> this weekend. I&#8217;m on the preparatory diet right now and that&#8217;s hard to conceal since I can&#8217;t eat anything but 800 calories of protein shakes a day. Since I&#8217;m still attending the networking events, I&#8217;ll stick out like a sore thumb. I thought I would just let my SQL Family know as you folks mean a lot to me.</p>
<p>I&#8217;m hoping that some of you who are struggling with similar issues will read this and take strength from it. If I can inspire someone else to make this commitment that would be great too. It doesn&#8217;t matter to me if people think my decision is rash or crazy. </p>
<p>It is what I need to do for my health so I don&#8217;t continue walking in my father&#8217;s footsteps.  </p>
<img src="http://feeds.feedburner.com/~r/Made2Mentor/~4/LTWer5rOu2I" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.made2mentor.com/2012/04/my-fathers-footsteps/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		<feedburner:origLink>http://www.made2mentor.com/2012/04/my-fathers-footsteps/</feedburner:origLink></item>
		<item>
		<title>Presenting at SQL Saturday Houston</title>
		<link>http://feedproxy.google.com/~r/Made2Mentor/~3/A9uBwOzvIdQ/</link>
		<comments>http://www.made2mentor.com/2012/04/presenting-at-sql-saturday-houston/#comments</comments>
		<pubDate>Mon, 16 Apr 2012 15:43:30 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Made2Manage]]></category>
		<category><![CDATA[Personal]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[Data Warehousing]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[PASS]]></category>
		<category><![CDATA[Presenting]]></category>

		<guid isPermaLink="false">http://www.made2mentor.com/?p=6965</guid>
		<description><![CDATA[
			
				
			
		
<p>This Saturday I&#8217;ll be down in Houston presenting at SQL Saturday #107. I can&#8217;t wait to hang out with some of the best minds in SQL Server, which just happen to be great friends of mine as well. The abstract for my session is below. </p>
Data Warehousing &#8211; How to Convince &#8220;The Bobs&#8221;
<p><p class="wp-caption-text">I got [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.made2mentor.com%2F2012%2F04%2Fpresenting-at-sql-saturday-houston%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.made2mentor.com%2F2012%2F04%2Fpresenting-at-sql-saturday-houston%2F&amp;source=Made2Mentor&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>This Saturday I&#8217;ll be down in Houston presenting at <a href="http://www.sqlsaturday.com/107/eventhome.aspx" title="SQL Saturday #107" target="_blank">SQL Saturday #107</a>. I can&#8217;t wait to hang out with some of the best minds in SQL Server, which just happen to be great friends of mine as well. The abstract for my session is below. </p>
<h3>Data Warehousing &#8211; How to Convince &#8220;The Bobs&#8221;</h3>
<p><div id="attachment_5656" class="wp-caption aligncenter" style="width: 510px"><a href="http://www.made2mentor.com/wp-content/uploads/2011/03/office_space_legos.jpg"><img src="http://www.made2mentor.com/wp-content/uploads/2011/03/office_space_legos.jpg" alt="" title="office_space_legos" width="500" height="375" class="size-full wp-image-5656" /></a><p class="wp-caption-text">I got a meeting with the Bobs in a couple of minutes... </p></div><br />
Building your first Data Warehouse is a long, and often difficult process. How can you get your boss to approve a Data Warehouse project? What’s the best way to explain dimensional modeling and the benefits of a Data Warehouse to a business person? What are the best/most cost effective ways of learning it? What kind of materials, hardware, software, etc do you need? What’s the best way to build a proof of concept that will impress your boss, as rapidly as possible?</p>
<p>Come to this presentation, and I’ll answer all of these questions plus the most important question of all. </p>
<p>“Is this good for the company?” Absolutely. </p>
<h3>Downloads</h3>
<p>You can download everything for the presentation <a href="http://www.made2mentor.com/thebobs/" target="_blank">here</a>. If you&#8217;re brand new to Data Warehousing, you should my read week of <a href="http://www.made2mentor.com/2011/02/sql-university-dimensional-modeling-and-why-it-doesnt-suck/" title="Dimensional Modeling Articles" target="_blank">Dimensional Modeling Articles</a> which I wrote for <a href="http://sqlchicken.com/sql-university/" title="SQL University" target="_blank">SQL University</a>. These will bring you up to speed to follow this fast paced presentation. </p>
<h3>Sessions I&#8217;m Targeting</h3>
<p>I&#8217;m hoping to see the following presentations: </p>
<ul>
<li><a href="http://www.sqlsaturday.com/viewsession.aspx?sat=107&#038;sessionid=8310" title="Strategies for Working with VLDBs" target="_blank">Strategies for Working with VLDBs</a> by Robert Davis. </li>
<li><a href="http://www.sqlsaturday.com/viewsession.aspx?sat=107&#038;sessionid=6358" title="SQL Admin Best Practices with DMV's" target="_blank">SQL Admin Best Practices with DMV&#8217;s</a> by William Assaf. </li>
<li><a href="http://www.sqlsaturday.com/viewsession.aspx?sat=107&#038;sessionid=8340" title="It is TEMPDB, Why Should You Care?" target="_blank">It is TEMPDB, Why Should You Care?</a> by Tim Radney.</li>
<li><a href="http://www.sqlsaturday.com/viewsession.aspx?sat=107&#038;sessionid=6043" title="Execution Plan Basics" target="_blank">Execution Plan Basics</a> by Thomas LeBlanc.</li>
<li><a href="http://www.sqlsaturday.com/viewsession.aspx?sat=107&#038;sessionid=6722" title="SQL Server Security for Developers" target="_blank">SQL Server Security for Developers</a> by Andy Warren.</li>
</ul>
<p>However, these are just the sessions that most interested me. You should <a href="http://www.sqlsaturday.com/107/schedule.aspx" title="check out the schedule" target="_blank">check out the schedule</a> for yourself. Just look at all the &#8220;names&#8221; who will be there. Besides those folks I already listed, other notables include Sean and Jenn McCown, Jack Corbett, Wendy Pastrick, Kendal Van Dyke, Tim Mitchel, Mike Hotek, Wes Brown, Kalen Delaney, and so many others. </p>
<p>You just can&#8217;t beat the learning and networking opportunities of SQL Saturdays. Hope to see many of you there. </p>
<img src="http://feeds.feedburner.com/~r/Made2Mentor/~4/A9uBwOzvIdQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.made2mentor.com/2012/04/presenting-at-sql-saturday-houston/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.made2mentor.com/2012/04/presenting-at-sql-saturday-houston/</feedburner:origLink></item>
		<item>
		<title>Should you Pursue a Business Intelligence Career?</title>
		<link>http://feedproxy.google.com/~r/Made2Mentor/~3/xFM5Bhoi0bM/</link>
		<comments>http://www.made2mentor.com/2012/03/should-you-pursue-a-business-intelligence-career/#comments</comments>
		<pubDate>Mon, 19 Mar 2012 14:42:37 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[Community]]></category>
		<category><![CDATA[PASS]]></category>
		<category><![CDATA[Reporting]]></category>

		<guid isPermaLink="false">http://www.made2mentor.com/?p=6908</guid>
		<description><![CDATA[
			
				
			
		
<p>The best way to answer that question is with other questions. Answer them honestly. Let me preface the questions by saying that I fully expect the majority of people who take the time to read this will answer yes to most of them. </p>

Are you intelligent in general? You don&#8217;t have to be a Rocket [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.made2mentor.com%2F2012%2F03%2Fshould-you-pursue-a-business-intelligence-career%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.made2mentor.com%2F2012%2F03%2Fshould-you-pursue-a-business-intelligence-career%2F&amp;source=Made2Mentor&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>The best way to answer that question is with other questions. Answer them honestly. Let me preface the questions by saying that I fully expect the majority of people who take the time to read this will answer yes to most of them. </p>
<ul>
<li>Are you <strong>intelligent</strong> in general? You don&#8217;t have to be a Rocket Surgeon to be a good BI specialist, but it isn&#8217;t for everyone. Many aspects of this job involve solving puzzles, but some of them don&#8217;t have clear solutions. It&#8217;s always easier to solve a problem that is known to have a good answer, than one that is unknown. </li>
<li>Do you <strong>love to learn</strong> new things? Notice that I did NOT say like, or are you willing, but are you <strong><a href="http://www.made2mentor.com/2008/09/are-you-willing-to-wear-the-white-belt/" title="White Belt" target="_blank">really passionate about learning</a></strong>? This career path <a href="http://www.made2mentor.com/2009/10/running-twice-as-fast/" title="Learning" target="_blank">requires constant learning</a> of several very different skills to achieve mastery. Also, keep in mind that your job is to understand the user&#8217;s jobs and therefore their data needs. Consequently, you spend a lot of time learning vs actually doing. Which leads us to..</li>
<li>Do you have a <strong>business mindset</strong>? You need not have a Masters Degree in Business Administration, but you have to understand, or quickly learn, how disparate business models work. It&#8217;s not enough to write excellent T-SQL, or have mad skills in SSRS, you have to understand what the user needs even if they can&#8217;t articulate it. </li>
<li>Are you <strong>well-spoken</strong>? Do you enjoy working with people? Working as a member of a team? What about public speaking? These are all valuable traits for a BI Specialist. A great deal of your time is likely to dedicated to client interviews. If you&#8217;re socially awkward, this may not be the career for you.  </li>
<li><strong>How well do you write</strong>? Proposals, project plans, etc. are all written and how well you write influences others&#8217; opinion of you. Those opinions determine the opportunities that will come your way.</li>
<li>Do you have the <strong>mind of the teacher</strong>? When sitting in front of a CEO, there is a fine line between boring them with deep technical details and simplifying things too much and which insults their intelligence. Executive buy in is critical and you must be savvy enough to get it. </li>
<li><strong>How&#8217;s your attitude?</strong> Are you generally an upbeat person? The epitome of this is Jes Borland (<a href="http://blogs.lessthandot.com/index.php/All/?author=420">Blog</a>/<a href="http://twitter.com/grrl_geek">Twitter</a>), who has the most enthusiastic personality I&#8217;ve ever seen. This attitude helps with all of the other attributes. People will be more interested in talking with you, helping you, etc. This is something I struggle with as my attitude can be closer to <a href="http://mentalgardener.wordpress.com/2008/02/23/are-you-a-tigger-or-an-eeyore/" title="Eeyore" target="_blank">Eeyore than Tigger</a> sometimes.</li>
<li>Are you <strong>self-managed and organized</strong>? Often the BI DBA works alone on a specific aspect of a project with little to no supervision. Will you be productive in this situation? </li>
<li>Are you <strong>detail oriented</strong>? How meticulous are you in your work habits? With experience you will learn certain patterns which increase efficiency in data modeling, ETL, and report creation. However, even more importantly is how meticulously you check your work and notice details. You are not the business expert, but the person requesting the work is. The first time you deliver a report which isn&#8217;t right, users will mistrust your figures for a long time. In our business, <strong>trust is everything</strong>, and it&#8217;s just too easy to miss something. Also, documentation for BI project is crucial and I find that only the most meticulous people are disciplined enough to do it.</li>
<li>Are you <strong>driven</strong>? Striving for BI mastery and staying on top of new products and techniques can be exhausting. It&#8217;s not a sprint, it&#8217;s a long distance run. Are you up for that?</li>
</ul>
<p>Please don&#8217;t misunderstand me. You don&#8217;t need to be excellent in all of those categories, none of us are. However, if you want to excel in Business Intelligence, you&#8217;d better have a good grasp of the majority of them and diligently be working toward mastery. </p>
<p>What do you think? Have I missed anything? </p>
<img src="http://feeds.feedburner.com/~r/Made2Mentor/~4/xFM5Bhoi0bM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.made2mentor.com/2012/03/should-you-pursue-a-business-intelligence-career/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.made2mentor.com/2012/03/should-you-pursue-a-business-intelligence-career/</feedburner:origLink></item>
		<item>
		<title>Why I Chose to Become a Business Intelligence DBA</title>
		<link>http://feedproxy.google.com/~r/Made2Mentor/~3/roy_lCHPi9E/</link>
		<comments>http://www.made2mentor.com/2012/03/why-i-chose-to-become-a-business-intelligence-dba/#comments</comments>
		<pubDate>Fri, 16 Mar 2012 15:10:39 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Made2Manage]]></category>
		<category><![CDATA[Personal]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SSIS]]></category>
		<category><![CDATA[SSRS]]></category>
		<category><![CDATA[Community]]></category>
		<category><![CDATA[Dimensional Modeling]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[PASS]]></category>
		<category><![CDATA[Philosophy]]></category>
		<category><![CDATA[Presenting]]></category>

		<guid isPermaLink="false">http://www.made2mentor.com/?p=6842</guid>
		<description><![CDATA[
			
				
			
		
<p>Recently I&#8217;ve received several emails with the same basic theme. I was sought out because I am a Business Intelligence Consultant and they want to know whether the career would be good for them. Well, it&#8217;s hard to read a short synopsis of someone&#8217;s experience and recommend a life altering directional change. So, I decided [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.made2mentor.com%2F2012%2F03%2Fwhy-i-chose-to-become-a-business-intelligence-dba%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.made2mentor.com%2F2012%2F03%2Fwhy-i-chose-to-become-a-business-intelligence-dba%2F&amp;source=Made2Mentor&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>Recently I&#8217;ve received several emails with the same basic theme. I was sought out because I am a Business Intelligence Consultant and they want to know whether the career would be good for them. Well, it&#8217;s hard to read a short synopsis of someone&#8217;s experience and recommend a life altering directional change. So, I decided to explain a bit about my history and why I made that decision. </p>
<h3>My History</h3>
<p><img alt="Teaching PowerPivot to M2M Admins" src="http://www.made2mentor.com/wp-content/uploads/2010/10/teaching.jpg" title="Me" class="aligncenter" width="567" height="699" /><br />
Five years ago, I had a very comfortable position working with a software product called Made2Manage, which utilizes SQL Server, hence the name of my blog. I was an expert at it and became able to solve problems very quickly. This left me with some idle time and I got comfortable. However, over time I got bored and needed challenge in my work life and realized that my procrastination to grow was costing me dearly in opportunities and money. Once you reach a point where you are comfortable, your value levels off. Also, I lived in Michigan, which was an economic black hole, so I was unlikely to earn a good living. </p>
<p>The first step I took was to move to a better economic area, Dallas Texas, and work for a much larger company as their Made2Manage expert. I got more involved with SQL Server and reporting and this led me to Brent Ozar. After asking some technical questions, I asked him a similar question that I&#8217;m addressing in this article. Basically, what should I do with my career? He put me in contact with experts in various disciplines, some not involving SQL Server, so I could decide my future direction. He convinced me to blog, get involved in the SQL community, and I became hooked. </p>
<h3>Why did I choose Business Intelligence? </h3>
<ul>
<li><strong>Fascination</strong>. I love working with data, cleaning it up, and creating systems to report on it. I enjoy showing a user their data in a meaningful way and watching them get excited. Data analysis is both a science and an art. Also, I enjoy practicing a skill that <a href="http://www.made2mentor.com/2009/04/i-can-do-magic/" title="Magic" target="_blank">many don&#8217;t understand</a> and cannot perform.
</li>
<li><strong>Variety</strong>. I don&#8217;t do well with <a href="http://www.made2mentor.com/2010/03/ants-marching/" title="boring" target="_blank">repetitive boring tasks</a>. As a Business Intelligence Consultant, most areas of SQL Server are involved so there are many different tasks to accomplish. This staves off boredom and insures that you are always learning.</li>
<li><strong>Challenge</strong>. Because the Business Intelligence discipline involves so many aspects of SQL Server, it&#8217;s a real challenge to gain a level of mastery. Do you think that BI is just about reporting? Think again. I have to understand data modeling, both OLTP and OLAP. I need to have a level of mastery in SSRS, SSIS, and SSAS; not to mention the new and evolving tools such as SQL Server 2012 Power View and PowerPivot. Further, you need to know how to set up SQL Servers, disaster recovery procedures, and performance tuning. In other words, my work at some point or another touches almost every aspect of SQL Server. </li>
<li><strong>Competition</strong>. Well, really the lack of competition as compared to other areas of technology. For example, I enjoy .NET software development, but I did not want to compete with outsourced labor or kids just coming out of college. Why try to compete with people who will do quality work for very low wages. Database Administration is not a topic that is typically taught in college so the practitioners tend to be more mature, by that I mean older <a href="http://www.made2mentor.com/wp-content/uploads/2011/04/sql_sat_63_set_up.jpg" title="fun" target="_blank">but not necessarily in temperament</a>. One reason why I didn&#8217;t take the Production DBA path is that it&#8217;s just too easy to outsource. Someone in a foreign land can check your backups, perform maintenance such as index and query tuning, etc. Also, Microsoft is pushing everything toward the Cloud, and this may cause issues for those with primary functions like disaster recovery, administration, and performance tuning. </li>
<li><strong>Demand</strong>. To quote Paris Hilton, &#8220;Its hot!&#8221; Microsoft is continuing to invest boatloads of money into Business Intelligence and more and more companies are investing in their BI infrastructure. In the world of SQL Server, Business Intelligence skills seem to be in the highest demand to me. </li>
<li><strong>Compensation</strong>. It&#8217;s basic supply and demand. Being a BI Professional is difficult so many people can&#8217;t do it. The demand is increasing. This disparity causes salaries to rise.  </li>
<li><strong>Freedom</strong>. My skill set allows me considerable freedom as to where I work and for whom. Ideally, I would work for a company which relies on SQL Server, which is almost everyone. However, even if a company doesn&#8217;t have SQL server databases, dimensional modeling skills and the flexibility of Integration Services to connect to nearly any data source means that BI professionals are still valuable. </li>
<li><strong>Interactivity</strong>. <a href="http://www.youtube.com/watch?v=mGS2tKQhdhY&#038;feature=related" title="People Person" target="_blank">&#8220;I&#8217;m a people person damnit!&#8221;</a> I enjoy talking to people which is one of the reasons I&#8217;m so active in the SQL community. Business Intelligence lends itself to more interaction because you are developing your projects for users. Also, this is one of the reasons why BI is resistant to outsourcing. Does your CEO want to spend hours talking with someone he can&#8217;t understand or someone he can meet face to face and feel confident that his/her needs are being addressed?<br />
<img alt="" src="http://www.made2mentor.com/wp-content/uploads/2010/10/dave_ryan_vic.jpg" title="Community" class="aligncenter" width="640" height="427" /></p>
<li><strong>Community </strong>- The SQL Server Community is the best technical community I&#8217;ve ever seen or heard of. One of the primary reasons I went the SQL Server route is because our community is so much better than that of competing products. When I have a question and Google it, someone I know has already blogged about it. They&#8217;re friendly, helpful, generous, exceedingly knowledgeable, and make it easier to learn SQL Server than other technologies.</li>
</ul>
<p>On Monday, I&#8217;ll answer the other question posed to me in those emails. Should you pursue a Business Intelligence Career? </p>
<img src="http://feeds.feedburner.com/~r/Made2Mentor/~4/roy_lCHPi9E" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.made2mentor.com/2012/03/why-i-chose-to-become-a-business-intelligence-dba/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://www.made2mentor.com/2012/03/why-i-chose-to-become-a-business-intelligence-dba/</feedburner:origLink></item>
		<item>
		<title>Multithreading Within the SSIS Dataflow</title>
		<link>http://feedproxy.google.com/~r/Made2Mentor/~3/sTdvvJ_GBqs/</link>
		<comments>http://www.made2mentor.com/2012/03/multithreading-within-the-ssis-dataflow/#comments</comments>
		<pubDate>Wed, 14 Mar 2012 15:14:47 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[SSIS]]></category>

		<guid isPermaLink="false">http://www.made2mentor.com/?p=6777</guid>
		<description><![CDATA[
			
				
			
		
<p>We often hear of the ability of SQL Server Integration Services (SSIS) to leverage multithreading to increase performance. However, multithreading in the control flow, executing two or more packages simultaneously, is what usually comes to mind. I recently ran into an issue with a large data set that I needed to multithread in the data [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.made2mentor.com%2F2012%2F03%2Fmultithreading-within-the-ssis-dataflow%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.made2mentor.com%2F2012%2F03%2Fmultithreading-within-the-ssis-dataflow%2F&amp;source=Made2Mentor&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>We often hear of the ability of SQL Server Integration Services (SSIS) to leverage multithreading to increase performance. However, multithreading in the control flow, executing two or more packages simultaneously, is what usually comes to mind. I recently ran into an issue with a large data set that I needed to multithread in the data flow. I was dealing with a large set of addresses and the client owned a third party SSIS product which they used to parse them and the performance wasn&#8217;t stellar. At the same time the server wasn&#8217;t even breathing hard, so I suspected that multithreading would speed up this process.</p>
<p>Since the addresses had sequentially numbered id values, the first thing that occurred to me was to use the <a href="http://msdn.microsoft.com/en-us/library/ms141815.aspx" title="Modulo" target="_blank">modulo function</a> in SSIS. Modulo returns the remainder when one number is divided by another. Naturally, I took to the web and found this excellent article by Josef Richberg (<a href="http://josef-richberg.squarespace.com/" title="Josef" target="_blank">Blog</a>/<a href="https://twitter.com/#!/sqlrunner" title="Twitter" target="_blank">Twitter</a>) regarding the use of the <a href="http://josef-richberg.squarespace.com/journal/tag/modulo" title="Modulo" target="_blank">T-SQL modulo function</a>, but my source was a huge text file, not SQL Server, so that option was out. Ultimately, this is what I decided to go with.</p>
<p>I surmised that if I used a Conditional Split and checked for numbers evenly divisible by 2 (modulo 0), I could evenly split the data flow. This worked, but I felt I could increase performance further by adding a 3rd option as shown below.<br />
<a href="http://www.made2mentor.com/wp-content/uploads/2012/03/multi2.png"><img src="http://www.made2mentor.com/wp-content/uploads/2012/03/multi2.png" alt="" title="multi2" width="482" height="143" class="aligncenter size-full wp-image-6788" /></a></p>
<p>For the purposes of this article, I created a Numbers or Table using code from the great <a href="http://www.sqlservercentral.com/articles/T-SQL/62867/" title="Modin" target="_blank">Jeff Moden</a>. I created a table of 10,000 sequential numbers (Field N) and got the following results: </p>
<p><a href="http://www.made2mentor.com/wp-content/uploads/2012/03/multi1.png"><img src="http://www.made2mentor.com/wp-content/uploads/2012/03/multi1.png" alt="" title="SSIS" width="569" height="423" class="aligncenter size-full wp-image-6787" /></a><br />
The Derived Column transforms represent some kind of process, in my case a 3rd party address parser. The data flow is evenly divided into three streams and then reunited by the Union All transform. </p>
<p>What if you want to divide the data flow into more than 3 even streams? Well, you could insert N % 4 == 0 as the first flow, but the results are too uneven in my opinion. <a href="http://www.made2mentor.com/wp-content/uploads/2012/03/multi31.png"><img src="http://www.made2mentor.com/wp-content/uploads/2012/03/multi31.png" alt="" title="SSIS" width="713" height="168" class="aligncenter size-full wp-image-6800" /></a></p>
<p>Using 5 as your first option yields a more even division and the flow is divided into 4 streams.<br />
<a href="http://www.made2mentor.com/wp-content/uploads/2012/03/multi4.png"><img src="http://www.made2mentor.com/wp-content/uploads/2012/03/multi4.png" alt="" title="multi4" width="720" height="503" class="aligncenter size-full wp-image-6790" /></a></p>
<p>This is great, but what do you do if you don&#8217;t have a sequential ID in your data set? Well, there are several options. Remember that the integer field need not be an ID. Any integer field, particularly if it has varied values, is a good candidate. </p>
<p>If you don&#8217;t have an integer type field, then you can create one using <a href="http://www.sqlis.com/sqlis/post/Generating-Surrogate-Keys.aspx" title="script task" target="_blank">the script task</a>. I&#8217;ve used this method several times to generate surrogate keys and it seems to have very little overhead. </p>
<p>Also, Tim Mitchell (<a href="http://www.timmitchell.net/">Blog</a>/<a href="http://twitter.com/tim_mitchell">Twitter</a>) blogged about how to <a href="http://www.timmitchell.net/post/2010/03/07/alpha-split-in-ssis-redux.aspx" target="_blank">split your data flow alphabetically</a> if you have a character type field with sufficient variation. I think this method is less advantageous because experimentation would be required to determine cut off values which result in evenly divided streams. </p>
<p>Any of you have other methods of splitting the data flow? </p>
<img src="http://feeds.feedburner.com/~r/Made2Mentor/~4/sTdvvJ_GBqs" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.made2mentor.com/2012/03/multithreading-within-the-ssis-dataflow/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://www.made2mentor.com/2012/03/multithreading-within-the-ssis-dataflow/</feedburner:origLink></item>
		<item>
		<title>State Name and Abbreviation Lookup Table Script</title>
		<link>http://feedproxy.google.com/~r/Made2Mentor/~3/fUjkWNO5ML0/</link>
		<comments>http://www.made2mentor.com/2012/03/state-name-and-abbreviation-lookup-table-script/#comments</comments>
		<pubDate>Tue, 13 Mar 2012 17:06:04 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Made2Manage]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SSIS]]></category>
		<category><![CDATA[SSRS]]></category>

		<guid isPermaLink="false">http://www.made2mentor.com/?p=6695</guid>
		<description><![CDATA[
			
				
			
		
<p>This is a quick script which creates a table consisting of State Names and their corresponding Abbreviations. I use this table when doing basic data quality checking and also standardizing state designations.</p>

CREATE TABLE dbo.StateLookup
&#40;
   StateID       INT IDENTITY &#40;1, 1&#41;,
   StateName     VARCHAR [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.made2mentor.com%2F2012%2F03%2Fstate-name-and-abbreviation-lookup-table-script%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.made2mentor.com%2F2012%2F03%2Fstate-name-and-abbreviation-lookup-table-script%2F&amp;source=Made2Mentor&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>This is a quick script which creates a table consisting of State Names and their corresponding Abbreviations. I use this table when doing basic data quality checking and also standardizing state designations.</p>

<div class="wp_syntax"><div class="code"><pre class="tsql" style="font-family:monospace;"><span style="color: #0000FF;">CREATE</span> <span style="color: #0000FF;">TABLE</span> dbo.<span style="color: #202020;">StateLookup</span>
<span style="color: #808080;">&#40;</span>
   StateID       <span style="color: #0000FF;">INT</span> <span style="color: #0000FF;">IDENTITY</span> <span style="color: #808080;">&#40;</span><span style="color: #000;">1</span>, <span style="color: #000;">1</span><span style="color: #808080;">&#41;</span>,
   StateName     <span style="color: #0000FF;">VARCHAR</span> <span style="color: #808080;">&#40;</span><span style="color: #000;">32</span><span style="color: #808080;">&#41;</span>,
   StateAbbrev   <span style="color: #0000FF;">CHAR</span> <span style="color: #808080;">&#40;</span><span style="color: #000;">2</span><span style="color: #808080;">&#41;</span>,
&nbsp;
<span style="color: #808080;">&#41;</span>
&nbsp;
<span style="color: #0000FF;">INSERT</span> <span style="color: #0000FF;">INTO</span> StateLookup
<span style="color: #0000FF;">VALUES</span> <span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'Alabama'</span>, <span style="color: #FF0000;">'AL'</span><span style="color: #808080;">&#41;</span>,
       <span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'Alaska'</span>, <span style="color: #FF0000;">'AK'</span><span style="color: #808080;">&#41;</span>,
       <span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'Arizona'</span>, <span style="color: #FF0000;">'AZ'</span><span style="color: #808080;">&#41;</span>,
       <span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'Arkansas'</span>, <span style="color: #FF0000;">'AR'</span><span style="color: #808080;">&#41;</span>,
       <span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'California'</span>, <span style="color: #FF0000;">'CA'</span><span style="color: #808080;">&#41;</span>,
       <span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'Colorado'</span>, <span style="color: #FF0000;">'CO'</span><span style="color: #808080;">&#41;</span>,
       <span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'Connecticut'</span>, <span style="color: #FF0000;">'CT'</span><span style="color: #808080;">&#41;</span>,
       <span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'Delaware'</span>, <span style="color: #FF0000;">'DE'</span><span style="color: #808080;">&#41;</span>,
       <span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'District of Columbia'</span>, <span style="color: #FF0000;">'DC'</span><span style="color: #808080;">&#41;</span>,
       <span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'Florida'</span>, <span style="color: #FF0000;">'FL'</span><span style="color: #808080;">&#41;</span>,
       <span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'Georgia'</span>, <span style="color: #FF0000;">'GA'</span><span style="color: #808080;">&#41;</span>,
       <span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'Hawaii'</span>, <span style="color: #FF0000;">'HI'</span><span style="color: #808080;">&#41;</span>,
       <span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'Idaho'</span>, <span style="color: #FF0000;">'ID'</span><span style="color: #808080;">&#41;</span>,
       <span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'Illinois'</span>, <span style="color: #FF0000;">'IL'</span><span style="color: #808080;">&#41;</span>,
       <span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'Indiana'</span>, <span style="color: #FF0000;">'IN'</span><span style="color: #808080;">&#41;</span>,
       <span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'Iowa'</span>, <span style="color: #FF0000;">'IA'</span><span style="color: #808080;">&#41;</span>,
       <span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'Kansas'</span>, <span style="color: #FF0000;">'KS'</span><span style="color: #808080;">&#41;</span>,
       <span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'Kentucky'</span>, <span style="color: #FF0000;">'KY'</span><span style="color: #808080;">&#41;</span>,
       <span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'Louisiana'</span>, <span style="color: #FF0000;">'LA'</span><span style="color: #808080;">&#41;</span>,
       <span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'Maine'</span>, <span style="color: #FF0000;">'ME'</span><span style="color: #808080;">&#41;</span>,
       <span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'Maryland'</span>, <span style="color: #FF0000;">'MD'</span><span style="color: #808080;">&#41;</span>,
       <span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'Massachusetts'</span>, <span style="color: #FF0000;">'MA'</span><span style="color: #808080;">&#41;</span>,
       <span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'Michigan'</span>, <span style="color: #FF0000;">'MI'</span><span style="color: #808080;">&#41;</span>,
       <span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'Minnesota'</span>, <span style="color: #FF0000;">'MN'</span><span style="color: #808080;">&#41;</span>,
       <span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'Mississippi'</span>, <span style="color: #FF0000;">'MS'</span><span style="color: #808080;">&#41;</span>,
       <span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'Missouri'</span>, <span style="color: #FF0000;">'MO'</span><span style="color: #808080;">&#41;</span>,
       <span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'Montana'</span>, <span style="color: #FF0000;">'MT'</span><span style="color: #808080;">&#41;</span>,
       <span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'Nebraska'</span>, <span style="color: #FF0000;">'NE'</span><span style="color: #808080;">&#41;</span>,
       <span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'Nevada'</span>, <span style="color: #FF0000;">'NV'</span><span style="color: #808080;">&#41;</span>,
       <span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'New Hampshire'</span>, <span style="color: #FF0000;">'NH'</span><span style="color: #808080;">&#41;</span>,
       <span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'New Jersey'</span>, <span style="color: #FF0000;">'NJ'</span><span style="color: #808080;">&#41;</span>,
       <span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'New Mexico'</span>, <span style="color: #FF0000;">'NM'</span><span style="color: #808080;">&#41;</span>,
       <span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'New York'</span>, <span style="color: #FF0000;">'NY'</span><span style="color: #808080;">&#41;</span>,
       <span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'North Carolina'</span>, <span style="color: #FF0000;">'NC'</span><span style="color: #808080;">&#41;</span>,
       <span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'North Dakota'</span>, <span style="color: #FF0000;">'ND'</span><span style="color: #808080;">&#41;</span>,
       <span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'Ohio'</span>, <span style="color: #FF0000;">'OH'</span><span style="color: #808080;">&#41;</span>,
       <span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'Oklahoma'</span>, <span style="color: #FF0000;">'OK'</span><span style="color: #808080;">&#41;</span>,
       <span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'Oregon'</span>, <span style="color: #FF0000;">'OR'</span><span style="color: #808080;">&#41;</span>,
       <span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'Pennsylvania'</span>, <span style="color: #FF0000;">'PA'</span><span style="color: #808080;">&#41;</span>,
       <span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'Rhode Island'</span>, <span style="color: #FF0000;">'RI'</span><span style="color: #808080;">&#41;</span>,
       <span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'South Carolina'</span>, <span style="color: #FF0000;">'SC'</span><span style="color: #808080;">&#41;</span>,
       <span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'South Dakota'</span>, <span style="color: #FF0000;">'SD'</span><span style="color: #808080;">&#41;</span>,
       <span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'Tennessee'</span>, <span style="color: #FF0000;">'TN'</span><span style="color: #808080;">&#41;</span>,
       <span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'Texas'</span>, <span style="color: #FF0000;">'TX'</span><span style="color: #808080;">&#41;</span>,
       <span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'Utah'</span>, <span style="color: #FF0000;">'UT'</span><span style="color: #808080;">&#41;</span>,
       <span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'Vermont'</span>, <span style="color: #FF0000;">'VT'</span><span style="color: #808080;">&#41;</span>,
       <span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'Virginia'</span>, <span style="color: #FF0000;">'VA'</span><span style="color: #808080;">&#41;</span>,
       <span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'Washington'</span>, <span style="color: #FF0000;">'WA'</span><span style="color: #808080;">&#41;</span>,
       <span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'West Virginia'</span>, <span style="color: #FF0000;">'WV'</span><span style="color: #808080;">&#41;</span>,
       <span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'Wisconsin'</span>, <span style="color: #FF0000;">'WI'</span><span style="color: #808080;">&#41;</span>,
       <span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'Wyoming'</span>, <span style="color: #FF0000;">'WY'</span><span style="color: #808080;">&#41;</span></pre></div></div>

<p>Also, you can add common misspellings to the table such as &#8216;Pensylvania&#8217; to further clean up your data. If your data set is international, you may want to add Canadian provinces as well. One way I use this table is with a SQL Server Integration Services (SSIS) Lookup transform and the following query.</p>

<div class="wp_syntax"><div class="code"><pre class="tsql" style="font-family:monospace;"><span style="color: #0000FF;">SELECT</span> StateName <span style="color: #0000FF;">State</span>, StateAbbrev <span style="color: #0000FF;">FROM</span> StateLookup
<span style="color: #0000FF;">UNION</span> <span style="color: #808080;">ALL</span>
<span style="color: #0000FF;">SELECT</span> StateAbbrev <span style="color: #0000FF;">State</span>, StateAbbrev <span style="color: #0000FF;">FROM</span> StateLookup</pre></div></div>

<p>This standardizes everything to 2 character states abbreviations. Any records which don&#8217;t match can be handed in another branch of the data flow through fuzzy matching or another method. </p>
<p>Do you use anything similar? </p>
<img src="http://feeds.feedburner.com/~r/Made2Mentor/~4/fUjkWNO5ML0" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.made2mentor.com/2012/03/state-name-and-abbreviation-lookup-table-script/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.made2mentor.com/2012/03/state-name-and-abbreviation-lookup-table-script/</feedburner:origLink></item>
		<item>
		<title>You are NOT a Junior DBA.</title>
		<link>http://feedproxy.google.com/~r/Made2Mentor/~3/8PiOKxZymgA/</link>
		<comments>http://www.made2mentor.com/2012/03/you-are-not-a-junior-dba/#comments</comments>
		<pubDate>Fri, 09 Mar 2012 16:00:43 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SSIS]]></category>
		<category><![CDATA[Education]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[PASS]]></category>
		<category><![CDATA[Philosophy]]></category>

		<guid isPermaLink="false">http://www.made2mentor.com/?p=6471</guid>
		<description><![CDATA[
			
				
			
		
<p>If you found your way to my blog, the chances are good that you consider yourself a Junior DBA. The chances are also good that you&#8217;re wrong. I can hear you saying right now, &#8220;Damn, you&#8217;re good, how do you know all that?&#8221; Well, I&#8217;m glad you asked. </p>
Perceptions
<p>I still remember my first SQL Server [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.made2mentor.com%2F2012%2F03%2Fyou-are-not-a-junior-dba%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.made2mentor.com%2F2012%2F03%2Fyou-are-not-a-junior-dba%2F&amp;source=Made2Mentor&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>If you found your way to my blog, the chances are good that you consider yourself a Junior DBA. The chances are also good that <strong>you&#8217;re wrong</strong>. I can hear you saying right now, &#8220;Damn, you&#8217;re good, how do you know all that?&#8221; Well, I&#8217;m glad you asked. </p>
<h3>Perceptions</h3>
<p>I still remember my first SQL Server User Group Meeting and feeling like the dumbest guy in the room. And for a couple of years, I continued to think of myself as a Junior DBA. So, I spent a small fortune on my own education. Took classes, attended meetings and SQL Saturdays, and <a href="http://www.made2mentor.com/2010/10/why-im-paying-my-own-way-to-pass-summit-2010-and-you-should-too/" target="_blank">paid my own way to my first PASS summit</a>. However, I still felt like my skill set didn&#8217;t measure up. </p>
<p>Meanwhile, local community members tried to convince me that I wasn&#8217;t Junior at all. Sean McCown (<a href="http://www.midnightdba.com/DBARant/">Blog</a>), Jason Massie, Tim Mitchell (<a href="http://www.timmitchell.net/">Blog</a>/<a href="http://twitter.com/tim_mitchell">Twitter</a>), and Tim Costello (<a href="http://www.timcost.com/">Blog</a>/<a href="http://twitter.com/TimCost">Twitter</a>) all encouraged me to go out and find my new job. However, perception is reality and if you think you are a Junior, then that&#8217;s what you are. </p>
<h3>Revelations</h3>
<p>About a year ago finally I started looking for new opportunities, and I realized something. I wasn&#8217;t a junior DBA and hadn&#8217;t been for some time. How did I come to this conclusion? The interview process. I had no problem passing any of the technical screens, nor did I have any major problems in any interview. I realized that my skills were better than the average bear. In fact, in one interview, the interviewer started jotting down notes as I pointed out several flaws in his SSIS Packages. Anyway as many of you know, last July I became a Senior Business Intelligence Consultant  for a firm in Irving and since then my skills have increased exponentially as well. If you want a confidence boost, become a consultant and look at the majority of existing code out there. Trust me, it&#8217;s an eye opener.   </p>
<h3>Comparisons</h3>
<p>I don&#8217;t know the origin, but I love the following quote. </p>
<blockquote><p>Two campers in the woods see a bear approaching and one guy starts putting on his running shoes. The other guy asks, &#8220;what are you crazy? You can’t outrun a bear.&#8221; The guy with the running shoes replies, &#8220;I don’t have to outrun the bear, I just have to outrun you.&#8221;</p></blockquote>
<p>The point is, when evaluating your skill level, compare yourself to the right group. I had been comparing myself to Brent Ozar (<a href="http://www.brentozar.com/">Blog</a>/<a href="http://twitter.com/brento">Twitter</a>), Brian Knight (<a href="http://www.bidn.com/blogs/brianknight/">Blog</a>/<a href="https://twitter.com/brianknight">Twitter</a>), Tim Mitchell (<a href="http://www.timmitchell.net/">Blog</a>/<a href="http://twitter.com/tim_mitchell">Twitter</a>), Andy Leonard (<a href="http://sqlblog.com/blogs/andy_leonard/">Blog</a>/<a href="http://twitter.com/andyleonard">Twitter</a>), and Sean McCown (<a href="http://www.midnightdba.com/DBARant/">Blog</a>). Notice a pattern there? They&#8217;re all <a href="http://mvp.support.microsoft.com/" title="SQL Server MVPs" target="_blank">SQL Server MVPs</a> and a couple of them are <a href="http://www.microsoft.com/learning/en/us/certification/master.aspx" title="Microsoft Certified Masters" target="_blank">Microsoft Certified Masters</a>. So of course I felt like I was inferior. However, I don&#8217;t have to &#8220;outrun&#8221; these guys, I only have to run faster than the average DBA and compared to mere mortals, my skills are great. </p>
<h3>Recommendations</h3>
<p>This all came to a head recently when a friend from my user group lost his job and needed help finding a new one. I made some calls and such for him, but the most important contribution I had was advice about his attitude. Please allow me to pass it on to you as well. </p>
<p>If you&#8217;re still reading this, you&#8217;re most likely going to User Group Meetings, SQL Saturdays, and other events and therefore NOT a junior anything. Remember that what you think of your skills is what others think of them as well. Skills correlate to income and the more you think you&#8217;re worth, the better the offer you&#8217;re likely to receive. Take <strong>pride</strong> in what you&#8217;ve learned and <strong>be confident</strong> that you can learn any skill faster than the average person. Always try to secure a position a little higher than your current skill level and be prepared to raise your game so you can succeed in it.  </p>
<p>If you&#8217;re not attending User Group Meetings and other PASS events like the upcoming <a href="http://www.sqlpass.org/sqlrally/2012/dallas/" title="SQLRally 2012" target="_blank">SQLRally 2012</a>, by all means get involved. SQLRally is in Dallas this year and I am in charge of the volunteers at this event so if you&#8217;d like to get more involved in the community, and <a href="http://www.made2mentor.com/2011/09/its-a-pass-thing-you-wouldnt-understand/" title="PASS" target="_blank">I completely recommend it</a>, message me. I&#8217;d be happy to help. </p>
<p>So if someone tells you that you&#8217;re a Junior DBA, or you&#8217;re telling yourself that very thing, be more confident in your abilities and always be working to improve.</p>
<img src="http://feeds.feedburner.com/~r/Made2Mentor/~4/8PiOKxZymgA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.made2mentor.com/2012/03/you-are-not-a-junior-dba/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		<feedburner:origLink>http://www.made2mentor.com/2012/03/you-are-not-a-junior-dba/</feedburner:origLink></item>
		<item>
		<title>Helpful Date Queries I Commonly Use</title>
		<link>http://feedproxy.google.com/~r/Made2Mentor/~3/89D59gueuPs/</link>
		<comments>http://www.made2mentor.com/2012/03/helpful-date-queries-which-i-commonly-use/#comments</comments>
		<pubDate>Thu, 08 Mar 2012 16:01:25 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[SQL]]></category>
		<category><![CDATA[Reporting]]></category>

		<guid isPermaLink="false">http://www.made2mentor.com/?p=6709</guid>
		<description><![CDATA[
			
				
			
		
<p>As I&#8217;ve mentioned before, I think I&#8217;m the most avid reader of my blog. I use it to document my work so that I don&#8217;t have to constantly re-invent the wheel. In this case, I find myself repeatedly searching for these scripts, often to populate SQL Reporting Services parameter defaults, so I thought I would [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.made2mentor.com%2F2012%2F03%2Fhelpful-date-queries-which-i-commonly-use%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.made2mentor.com%2F2012%2F03%2Fhelpful-date-queries-which-i-commonly-use%2F&amp;source=Made2Mentor&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>As I&#8217;ve mentioned before, I think I&#8217;m the most avid reader of my blog. I use it to document my work so that I don&#8217;t have to constantly re-invent the wheel. In this case, I find myself repeatedly searching for these scripts, often to populate SQL Reporting Services parameter defaults, so I thought I would share them with my readers as well.</p>

<div class="wp_syntax"><div class="code"><pre class="tsql" style="font-family:monospace;"><span style="color: #008080;">-- Midnight of Current Day</span>
<span style="color: #0000FF;">SELECT</span> <span style="color: #FF00FF;">dateadd</span> <span style="color: #808080;">&#40;</span>dd, <span style="color: #000;">0</span>, <span style="color: #FF00FF;">datediff</span> <span style="color: #808080;">&#40;</span>dd, <span style="color: #000;">0</span>, <span style="color: #FF00FF;">Getdate</span> <span style="color: #808080;">&#40;</span><span style="color: #808080;">&#41;</span><span style="color: #808080;">&#41;</span><span style="color: #808080;">&#41;</span>
&nbsp;
<span style="color: #008080;">-- Midnight of last Friday (or whichever day).</span>
<span style="color: #008080;">/*The day of the week of date entered determines the result. Pick
a Friday, any Friday, and you will get last Friday.
Replace the - 0 with any increment of 7 to get previous weeks.*/</span>
&nbsp;
<span style="color: #0000FF;">SELECT</span> <span style="color: #FF00FF;">DATEADD</span> <span style="color: #808080;">&#40;</span><span style="color: #0000FF;">day</span>,<span style="color: #808080;">&#40;</span><span style="color: #808080;">&#40;</span><span style="color: #FF00FF;">DATEDIFF</span> <span style="color: #808080;">&#40;</span><span style="color: #0000FF;">day</span>, <span style="color: #FF0000;">'20120203'</span>, <span style="color: #0000FF;">CURRENT_TIMESTAMP</span><span style="color: #808080;">&#41;</span> <span style="color: #808080;">/</span> <span style="color: #000;">7</span><span style="color: #808080;">&#41;</span> <span style="color: #808080;">*</span> <span style="color: #000;">7</span><span style="color: #808080;">&#41;</span> <span style="color: #808080;">-</span> <span style="color: #000;">0</span>,<span style="color: #FF0000;">'20120203'</span><span style="color: #808080;">&#41;</span>
&nbsp;
<span style="color: #008080;">--Day Number of Current year</span>
<span style="color: #008080;">-- Removed because the query was faulty. See comments. </span>
&nbsp;
&nbsp;
<span style="color: #008080;">--First Day of Month</span>
<span style="color: #0000FF;">SELECT</span> <span style="color: #FF00FF;">DATEADD</span> <span style="color: #808080;">&#40;</span>mm, <span style="color: #FF00FF;">DATEDIFF</span> <span style="color: #808080;">&#40;</span>mm, <span style="color: #000;">0</span>, <span style="color: #FF00FF;">GetDate</span> <span style="color: #808080;">&#40;</span><span style="color: #808080;">&#41;</span><span style="color: #808080;">&#41;</span>, <span style="color: #000;">0</span><span style="color: #808080;">&#41;</span>
&nbsp;
<span style="color: #008080;">--Last Day of Month</span>
&nbsp;
<span style="color: #0000FF;">SELECT</span> <span style="color: #FF00FF;">DATEADD</span> <span style="color: #808080;">&#40;</span>s, <span style="color: #808080;">-</span><span style="color: #000;">1</span>, <span style="color: #FF00FF;">DATEADD</span> <span style="color: #808080;">&#40;</span>mm, <span style="color: #FF00FF;">DATEDIFF</span> <span style="color: #808080;">&#40;</span>m, <span style="color: #000;">0</span>, <span style="color: #FF00FF;">GETDATE</span> <span style="color: #808080;">&#40;</span><span style="color: #808080;">&#41;</span><span style="color: #808080;">&#41;</span> <span style="color: #808080;">+</span> <span style="color: #000;">1</span>, <span style="color: #000;">0</span><span style="color: #808080;">&#41;</span><span style="color: #808080;">&#41;</span>
&nbsp;
<span style="color: #008080;">--First Day of Current Year</span>
&nbsp;
<span style="color: #0000FF;">SELECT</span> <span style="color: #FF00FF;">DATEADD</span> <span style="color: #808080;">&#40;</span>yy, <span style="color: #FF00FF;">DATEDIFF</span> <span style="color: #808080;">&#40;</span>yy, <span style="color: #000;">0</span>, <span style="color: #FF00FF;">getdate</span> <span style="color: #808080;">&#40;</span><span style="color: #808080;">&#41;</span><span style="color: #808080;">&#41;</span>, <span style="color: #000;">0</span><span style="color: #808080;">&#41;</span>
&nbsp;
<span style="color: #008080;">--First Day of Previous Years</span>
<span style="color: #008080;">--Substitute '-1' with whichever number of years to reverse</span>
<span style="color: #0000FF;">SELECT</span> <span style="color: #FF00FF;">DATEADD</span> <span style="color: #808080;">&#40;</span>yy, <span style="color: #FF00FF;">DATEDIFF</span> <span style="color: #808080;">&#40;</span>yy, <span style="color: #000;">0</span>, <span style="color: #FF00FF;">getdate</span> <span style="color: #808080;">&#40;</span><span style="color: #808080;">&#41;</span><span style="color: #808080;">&#41;</span> <span style="color: #808080;">-</span> <span style="color: #000;">1</span>, <span style="color: #000;">0</span><span style="color: #808080;">&#41;</span>
&nbsp;
<span style="color: #008080;">--First Day of Next Year</span>
<span style="color: #0000FF;">SELECT</span> <span style="color: #FF00FF;">DATEADD</span> <span style="color: #808080;">&#40;</span>yy, <span style="color: #FF00FF;">DATEDIFF</span> <span style="color: #808080;">&#40;</span>yy, <span style="color: #000;">0</span>, <span style="color: #FF00FF;">getdate</span> <span style="color: #808080;">&#40;</span><span style="color: #808080;">&#41;</span><span style="color: #808080;">&#41;</span> <span style="color: #808080;">+</span> <span style="color: #000;">1</span>, <span style="color: #000;">0</span><span style="color: #808080;">&#41;</span>
&nbsp;
<span style="color: #008080;">--Past 30 days.</span>
<span style="color: #0000FF;">SELECT</span> <span style="color: #FF00FF;">DATEADD</span> <span style="color: #808080;">&#40;</span>dd, <span style="color: #000;">0</span>, <span style="color: #FF00FF;">DATEDIFF</span> <span style="color: #808080;">&#40;</span>dd, <span style="color: #000;">30</span>, <span style="color: #FF00FF;">GETDATE</span> <span style="color: #808080;">&#40;</span><span style="color: #808080;">&#41;</span><span style="color: #808080;">&#41;</span><span style="color: #808080;">&#41;</span>
&nbsp;
<span style="color: #008080;">--Add in beginning and end of prior quarter.</span>
<span style="color: #0000FF;">SELECT</span> <span style="color: #FF00FF;">DATEADD</span> <span style="color: #808080;">&#40;</span>qq, <span style="color: #FF00FF;">DATEDIFF</span> <span style="color: #808080;">&#40;</span>qq, <span style="color: #000;">0</span>, <span style="color: #FF00FF;">getdate</span> <span style="color: #808080;">&#40;</span><span style="color: #808080;">&#41;</span><span style="color: #808080;">&#41;</span>, <span style="color: #000;">0</span><span style="color: #808080;">&#41;</span>
&nbsp;
<span style="color: #008080;">--First Day of Prior Quarter</span>
<span style="color: #0000FF;">SELECT</span> <span style="color: #FF00FF;">DATEADD</span> <span style="color: #808080;">&#40;</span>qq, <span style="color: #FF00FF;">DATEDIFF</span> <span style="color: #808080;">&#40;</span>qq, <span style="color: #000;">0</span>, <span style="color: #FF00FF;">getdate</span> <span style="color: #808080;">&#40;</span><span style="color: #808080;">&#41;</span><span style="color: #808080;">&#41;</span> <span style="color: #808080;">-</span> <span style="color: #000;">1</span>, <span style="color: #000;">0</span><span style="color: #808080;">&#41;</span></pre></div></div>

<p>I&#8217;m not taking credit for these scripts as I&#8217;ve <del datetime="2012-03-08T15:46:20+00:00">stolen</del> borrowed these scripts from various places, most recently <a href="http://www.karaszi.com/SQLServer/info_datetime.asp" title="Excellent Date Link" target="_blank">this excellent post.</a> </p>
<p>Do you have any queries that you&#8217;d like to add? </p>
<img src="http://feeds.feedburner.com/~r/Made2Mentor/~4/89D59gueuPs" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.made2mentor.com/2012/03/helpful-date-queries-which-i-commonly-use/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		<feedburner:origLink>http://www.made2mentor.com/2012/03/helpful-date-queries-which-i-commonly-use/</feedburner:origLink></item>
		<item>
		<title>Free Support Can Cost a Fortune</title>
		<link>http://feedproxy.google.com/~r/Made2Mentor/~3/7KGNvkl_1TU/</link>
		<comments>http://www.made2mentor.com/2012/02/free-support-can-cost-a-fortune/#comments</comments>
		<pubDate>Fri, 10 Feb 2012 20:17:03 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Made2Manage]]></category>
		<category><![CDATA[Personal]]></category>

		<guid isPermaLink="false">http://www.made2mentor.com/?p=6677</guid>
		<description><![CDATA[
			
				
			
		
<p>While performing some SQL programming work for a client they mentioned a problem they had with a vendor. I won&#8217;t name the vendor but I will say that it rhymes with Made2Damage. Anyway, the client spent most of the day trying to fix a problem with the help of telephone support. Hours were spent on [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.made2mentor.com%2F2012%2F02%2Ffree-support-can-cost-a-fortune%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.made2mentor.com%2F2012%2F02%2Ffree-support-can-cost-a-fortune%2F&amp;source=Made2Mentor&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p><a href="http://www.made2mentor.com/wp-content/uploads/2012/02/support.jpg"><img src="http://www.made2mentor.com/wp-content/uploads/2012/02/support.jpg" alt="support" title="support" width="458" height="300" class="alignleft size-full wp-image-6686" /></a>While performing some SQL programming work for a client they mentioned a problem they had with a vendor. I won&#8217;t name the vendor but I will say that it rhymes with Made2Damage. Anyway, the client spent most of the day trying to fix a problem with the help of telephone support. Hours were spent on the phone and at various attempted fixes. Now, I&#8217;m not blaming the vendor because the support representative can&#8217;t know this client&#8217;s setup as intimately as I do so they had to address every possible cause of the problem. </p>
<p>I asked him to briefly describe the problem. I then responded to him, &#8220;let me guess, the problem turned out to be the&#8230;.&#8221; Of course, it was the same solution that he got through support, but it took five minutes to fix versus six or seven hours. </p>
<p>I asked why the client didn&#8217;t simply call me. He sighed and said that the vendor support was &#8220;free&#8221; (yearly paid support) while I would charge him per hour. </p>
<p>So, he wasted most of the day&#8230; but at least he saved fifty bucks. </p>
<img src="http://feeds.feedburner.com/~r/Made2Mentor/~4/7KGNvkl_1TU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.made2mentor.com/2012/02/free-support-can-cost-a-fortune/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.made2mentor.com/2012/02/free-support-can-cost-a-fortune/</feedburner:origLink></item>
		<item>
		<title>User Defined Data Type Definition Script</title>
		<link>http://feedproxy.google.com/~r/Made2Mentor/~3/GIi6zl7SBSE/</link>
		<comments>http://www.made2mentor.com/2012/01/user-defined-data-type-definition-script/#comments</comments>
		<pubDate>Thu, 19 Jan 2012 19:41:18 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[SQL]]></category>
		<category><![CDATA[Code Samples]]></category>

		<guid isPermaLink="false">http://www.made2mentor.com/?p=6641</guid>
		<description><![CDATA[
			
				
			
		
<p>Recently I worked on a project where every data type was user defined. In case you weren&#8217;t aware, SQL Server supports the use of User Defined Data Types. These are custom data types which are based on the standard types. For example, if your data always uses a two character string for states, you may [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.made2mentor.com%2F2012%2F01%2Fuser-defined-data-type-definition-script%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.made2mentor.com%2F2012%2F01%2Fuser-defined-data-type-definition-script%2F&amp;source=Made2Mentor&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>Recently I worked on a project where every data type was user defined. In case you weren&#8217;t aware, SQL Server supports the use of <a href="http://www.mssqltips.com/sqlservertip/1628/sql-server-user-defined-data-types-rules-and-defaults/" title="UDTs" target="_blank">User Defined Data Types</a>. These are custom data types which are based on the standard types. For example, if your data always uses a two character string for states, you may want to create a data type called UDT_State. </p>
<p>However, this project had 40 UDTs and their names were fairly ambiguous. So, I created a &#8220;cheat sheet&#8221; script to refer to when working in that environment. </p>
<p>First, let&#8217;s create some user defined data types.</p>

<div class="wp_syntax"><div class="code"><pre class="tsql" style="font-family:monospace;"><span style="color: #0000FF;">use</span> tempdb
go
<span style="color: #0000FF;">CREATE</span> TYPE <span style="color: #808080;">&#91;</span>dbo<span style="color: #808080;">&#93;</span>.<span style="color: #808080;">&#91;</span>UDT_State<span style="color: #808080;">&#93;</span> <span style="color: #0000FF;">FROM</span> <span style="color: #0000FF;">char</span><span style="color: #808080;">&#40;</span><span style="color: #000;">2</span><span style="color: #808080;">&#41;</span> <span style="color: #808080;">NOT</span> <span style="color: #808080;">NULL</span>;
GO
<span style="color: #0000FF;">CREATE</span> TYPE <span style="color: #808080;">&#91;</span>dbo<span style="color: #808080;">&#93;</span>.<span style="color: #808080;">&#91;</span>UDT_User_Id<span style="color: #808080;">&#93;</span> <span style="color: #0000FF;">FROM</span> <span style="color: #0000FF;">Int</span> <span style="color: #808080;">NOT</span> <span style="color: #808080;">NULL</span>;
GO
<span style="color: #0000FF;">CREATE</span> TYPE <span style="color: #808080;">&#91;</span>dbo<span style="color: #808080;">&#93;</span>.<span style="color: #808080;">&#91;</span>UDT_Cost<span style="color: #808080;">&#93;</span> <span style="color: #0000FF;">FROM</span> <span style="color: #0000FF;">decimal</span><span style="color: #808080;">&#40;</span><span style="color: #000;">10</span>, <span style="color: #000;">3</span><span style="color: #808080;">&#41;</span> <span style="color: #808080;">NULL</span>;
GO</pre></div></div>

<p>The following script is compatible with SQL 2005 through 2008 R2. I believe it also works on SQL 2000 but don&#8217;t have access to a server to test it.</p>

<div class="wp_syntax"><div class="code"><pre class="tsql" style="font-family:monospace;"><span style="color: #0000FF;">SELECT</span> ST.<span style="color: #808080;">&#91;</span>name<span style="color: #808080;">&#93;</span> <span style="color: #0000FF;">AS</span> UDTName,
       <span style="color: #0000FF;">CASE</span>
          <span style="color: #0000FF;">WHEN</span> ST1.<span style="color: #808080;">&#91;</span>name<span style="color: #808080;">&#93;</span> <span style="color: #808080;">LIKE</span> <span style="color: #FF0000;">'%char'</span>
          <span style="color: #0000FF;">THEN</span>
             ST1.<span style="color: #808080;">&#91;</span>name<span style="color: #808080;">&#93;</span> <span style="color: #808080;">+</span> <span style="color: #FF0000;">'('</span> <span style="color: #808080;">+</span> <span style="color: #0000FF;">cast</span> <span style="color: #808080;">&#40;</span>ST.<span style="color: #202020;">max_length</span> <span style="color: #0000FF;">AS</span> <span style="color: #0000FF;">VARCHAR</span> <span style="color: #808080;">&#40;</span><span style="color: #000;">5</span><span style="color: #808080;">&#41;</span><span style="color: #808080;">&#41;</span> <span style="color: #808080;">+</span> <span style="color: #FF0000;">')'</span>
          <span style="color: #0000FF;">WHEN</span> ST1.<span style="color: #808080;">&#91;</span>name<span style="color: #808080;">&#93;</span> <span style="color: #808080;">=</span> <span style="color: #FF0000;">'numeric'</span> <span style="color: #808080;">OR</span> ST1.<span style="color: #808080;">&#91;</span>name<span style="color: #808080;">&#93;</span> <span style="color: #808080;">=</span> <span style="color: #FF0000;">'decimal'</span>
          <span style="color: #0000FF;">THEN</span>
               ST1.<span style="color: #808080;">&#91;</span>name<span style="color: #808080;">&#93;</span>
             <span style="color: #808080;">+</span> <span style="color: #FF0000;">'('</span> <span style="color: #808080;">+</span> <span style="color: #0000FF;">cast</span> <span style="color: #808080;">&#40;</span>ST.<span style="color: #808080;">&#91;</span><span style="color: #0000FF;">precision</span><span style="color: #808080;">&#93;</span> <span style="color: #0000FF;">AS</span> <span style="color: #0000FF;">VARCHAR</span> <span style="color: #808080;">&#40;</span><span style="color: #000;">5</span><span style="color: #808080;">&#41;</span><span style="color: #808080;">&#41;</span>
             <span style="color: #808080;">+</span> <span style="color: #FF0000;">','</span> <span style="color: #808080;">+</span> <span style="color: #0000FF;">Cast</span> <span style="color: #808080;">&#40;</span>ST.<span style="color: #202020;">scale</span> <span style="color: #0000FF;">AS</span> <span style="color: #0000FF;">VARCHAR</span> <span style="color: #808080;">&#40;</span><span style="color: #000;">5</span><span style="color: #808080;">&#41;</span><span style="color: #808080;">&#41;</span> <span style="color: #808080;">+</span> <span style="color: #FF0000;">')'</span>
          <span style="color: #0000FF;">ELSE</span>
             ST1.<span style="color: #808080;">&#91;</span>name<span style="color: #808080;">&#93;</span>
       <span style="color: #0000FF;">END</span> <span style="color: #0000FF;">AS</span> BaseType,
       <span style="color: #0000FF;">CASE</span> ST.<span style="color: #202020;">is_nullable</span> <span style="color: #0000FF;">WHEN</span> <span style="color: #000;">1</span> <span style="color: #0000FF;">THEN</span> <span style="color: #FF0000;">'NULL'</span> <span style="color: #0000FF;">ELSE</span> <span style="color: #FF0000;">'NOT NULL'</span> <span style="color: #0000FF;">END</span> <span style="color: #0000FF;">AS</span> Nullable
  <span style="color: #0000FF;">FROM</span>    sys.<span style="color: #202020;">types</span> ST
       <span style="color: #808080;">JOIN</span>
          sys.<span style="color: #202020;">types</span> ST1
       <span style="color: #0000FF;">ON</span> ST1.<span style="color: #202020;">user_type_id</span> <span style="color: #808080;">=</span> ST.<span style="color: #202020;">system_type_id</span>
 <span style="color: #0000FF;">WHERE</span> ST.<span style="color: #202020;">is_user_defined</span> <span style="color: #808080;">=</span> <span style="color: #000;">1</span></pre></div></div>

<p><a href="http://www.made2mentor.com/wp-content/uploads/2012/01/UDT-Results.png"><img src="http://www.made2mentor.com/wp-content/uploads/2012/01/UDT-Results.png" alt="" title="UDT Results" width="310" height="122" class="alignleft size-full wp-image-6658" /></a></p>
<p>Special thanks to Jeff Rush (<a href="http://www.bidn.com/blogs/JeffRush">Blog</a>/<a href="http://twitter.com/jeffrush">Twitter</a>) for the idea to write this script. </p>
<img src="http://feeds.feedburner.com/~r/Made2Mentor/~4/GIi6zl7SBSE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.made2mentor.com/2012/01/user-defined-data-type-definition-script/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.made2mentor.com/2012/01/user-defined-data-type-definition-script/</feedburner:origLink></item>
	</channel>
</rss>

