Wednesday, June 27, 2012

Career Advice From Zombies

Normally I would pass on an article with this title but, as a subscriber to the Dice.com blog and someone currently reading World War Z (a great zombie book), I was intrigued and gave this a quick read...

This is a great article -- not just for job seekers but for everyone with aspirations to advance a skill and/or their careers, or those with a specific goal. Zombies lead by example: they demonstrate how to set goals and achieve those goals with a focused tenacity that all living persons should aspire to emulate.

Career Advice from Zombies


--ab

The new xmlsqlninja logo ('X-M-L'-'See-Quel' 'ninja')

Last Updated: 4/19/2013 (code cleanup, added new pic)

Tuesday, June 19, 2012

Recovering an unsaved SSMS Query

This is a something I deal with from time-to-time; yesterday, most recently, as a matter of fact.

So, you have been in SQL Server Management Studio (SSMS) all morning working on that query when the office lights flicker, then…. Darkness! Your monitor turns off and you hear your PC fans go quiet. You just lost power but, even worse, you just lost that query.

You know that you need to save your work as often as possible (and usually do) but now is not the time for that advice. Is there any way to get that work back?

Here's how the Ninja does it:

Steps to recovery an unsaved query created in SSMS

1) Go to Start

2) Go into the Search programs and files box

Vista/Windows 7 - Search Programs and Files

3) Search for this (exactly as shown):

"~AutoRecover.

Your work should appear under Documents and is saved as ~autoRecover.{something}.sql

4) Right-click on one of the “~autoRecover” files and select Open File Location.

5) Your SQL files should be in that folder.

At this point you can open them and save them as a different name.



Behind the scene:

Starting with version 2005, SQL Server includes an Auto Recovery feature which automatically saves your work. It behaves like the Auto Recovery feature in Microsoft Word where, if your system should crash or hang, you can retrieve the files from their recovered state.
This feature in SQL Server is not configurable via the GUI;it can only (to my knowledge) be enabled/disabled in the registry under:

2008: HKEY_CURRENT_USER\Software\Microsoft\Microsoft SQL Server\100\Tools\Shell\General\AutoRecover
2005: HKEY_CURRENT_USER\Software\Microsoft\Microsoft SQL Server\90\Tools\Shell\General\AutoRecover

Last Updated: May 1, 2013 (formatting)

Thursday, June 14, 2012

It's Official!

XSLT is a functional programming language

That's right... according to the W3C  XSLT [3.0] according to the working draft, will be a fully-fledged functional programming language. I included a link and here's the text (emph mine):

...XSLT 3.0 also delivers enhancements made to the XPath language and to the standard function library, including the following:

  • Variables can now be bound in XPath using the let expression.
  • Functions are now first class values, and can be passed as arguments to other (higher-order) functions, making XSLT a fully-fledged functional programming language.

--ab

The new xmlsqlninja logo ('X-M-L'-'See-Quel' 'ninja')

Further Reading:


HTML code used to generate this article:

<h2>XSLT is a functional programming language</h2>


<p>That's right... according to the <a href="http://www.w3.org/">W3C</a> &nbsp;<i>XSLT [3.0] according to the working draft, will be a fully-fledged functional programming language</i>. I included a link and here's the text (emph mine): </p>

<div style="width: 550px; border: solid 1px lightgray; margin-left:20px; font-style:italic">

<p style="margin-left:20px;margin-right:30px;">...XSLT 3.0 also delivers enhancements made to the XPath language and to the standard function library, including the following:</p>

<ul>

<li>Variables can now be bound in XPath using the <b>let</b> expression.</li>

<li>Functions are now first class values, and can be passed as arguments to other (higher-order) functions, <b>making XSLT a fully-fledged functional programming language</b>.</li>

</ul>

</div>

<br/>

<p><b><i>--ab</i></b></p>

<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjChGlnlBCHCS920uS2-eMvBzcGdrpC731KZzC26SBWM4yjOy9T7sduli0o3dcl8CfRm9KyRrO4c-abotmSVmna4YdZN5lj8z6CLSHSRmGvB8DN98Pduj61oE0Oa4xzMbLL1QfgZIkOcAs/s251/ninja.jpg"

                 alt="The new xmlsqlninja logo ('X-M-L'-'See-Quel' 'ninja')"

                 title="The new xmlsqlninja logo ('X-M-L'-'See-Quel' 'ninja')"

                 style="height: 100px;" />

<br/><br/>

<h2>Further Reading:</h2>

<ul style="margin-left: 10px;">

<li><a href="http://www.w3.org/TR/xslt-30/" style="color:#0040FF;">XSL Transformations (XSLT) Version 3.0</a><i>(W3C)</i></li>

<li><a href="http://archive.xmlprague.cz/2012/presentations/Whats_new_3.0_XPath_XSLT_XSD_1_1.pdf" style="color:#0040FF;">What's new in 3.0 </a> <i>(Michael Kay)</i></li>

</ul>

<br/>

<p style="margin-bottom:0px;">HTML code used to generate this article:</p>

<style>

div.WordSection1 {border: solid grey 1px; padding: 10px; height: 100px; width:540px; overflow:auto; background-color: #E6E6E6;}

</style>

<div class="WordSection1">λ</div>

<br/>

<p><b>Last Updated:</b> 4/21/2013 (code cleanup, added html code)</p>


Last Updated: 4/21/2013 (code cleanup, added html code)

Saturday, June 2, 2012

You are looking at XML right now


Welcome to my first blog post!

... well, kinda. This is actually a re-write of my first post. I am changing things up a bit, specifically what this blog is all about.

First, I am not a ninja! Not at XML, SQL or anything else. I am just a guy who is really into SQL Development (set-based) and XML (data modeling and transforms). I also think ninjas are kinda cool soo: xmlsqlninja it is. After doing both for many years I have picked up a few tricks which I will pass along. Please come back often for useful BI, T-SQL (all versions through 2012), XML, XSD and XSLT (1.0,2.0 & 3.0) tips and tricks.


--ab

The new xmlsqlninja logo ('X-M-L'-'See-Quel' 'ninja')

Further Reading


HTML code used to generate this article:

<style type="text/css">

     body            {font-family: arial, Trebuchet MS;}

     a:link          {color:blue;text-decoration: none;}

     a:visited       {color:blue;text-decoration: none;}

     a:hover         {color:red;text-decoration: underline;}

     a:active        {color:green;text-decoration: underline;}

     p               {font-family: Trebuchet MS, arial;}

     li              {margin-bottom: 0pt;}

     p.pic          {width: 480px;padding: 10px;}

     img.png         {margin-top: 10px;border: solid 0px #808080; height:15%;}

     img.jpg         {margin-top: 10px;border: solid 0px #808080; height:15%; margin-bottom: 0px;}

     h2.sectionheader{margin-top: 20px;margin-bottom: 0px;}

</style>

<br/>

<h3>Welcome to my first blog post!</h3>

<p>

... well, kinda. This is actually a re-write of my first post. I am changing things up a bit, specifically what this blog is all about.

</p>

<p>

First, I am not a ninja! Not at XML, SQL or anything else. I am just a guy who is really into SQL Development (set-based) and XML (data modeling and transforms).

I also think ninjas are kinda cool soo: xmlsqlninja it is. After doing both for many years I have picked up a few tricks which I will pass along.

Please come back often for useful BI, T-SQL (all versions through 2012), XML, XSD and XSLT (1.0,2.0 &amp; 3.0) tips and tricks.

</p>

<br/>

<p><b><i>--ab</i></b></p>

<div class="pic">

<img alt="The new xmlsqlninja logo ('X-M-L'-'See-Quel' 'ninja')" class="jpg" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjChGlnlBCHCS920uS2-eMvBzcGdrpC731KZzC26SBWM4yjOy9T7sduli0o3dcl8CfRm9KyRrO4c-abotmSVmna4YdZN5lj8z6CLSHSRmGvB8DN98Pduj61oE0Oa4xzMbLL1QfgZIkOcAs/s251/ninja.jpg" title="The new xmlsqlninja logo ('X-M-L'-'See-Quel' 'ninja')" style="height:100px;" />

</div>

<br/>

<h2>Further Reading</h2>

<ul>

<li><a href="http://www.sqlservercentral.com/" title="This is IMHO THE place to go to learn and ask questions about SQL server">THE best SQL Server site on the web</a></li>

<li><a href="http://www.w3schools.com/sql/default.asp" title="Wanna learn SQL? XML? Transforms? XML Schema? Check out W3Schools!">Wanna Learn SQL? XML? HTML? CSS? XSLT? XSD?...</a></li>

<li><a href="http://www.w3.org/TR/xslt-30/" title="According the the W3C (right below ''What's new in XSLT 3.0'' -- emphasis mine): ''Functions are now first class values, and can be passed as arguments to other (higher-order) functions, **making XSLT a fully-fledged functional programming language.**''">XSLT 3.0 IS a FULLY FUNCTIONAL programming Language</a></li>

</ul>

<br/><br/>

<p style="margin-bottom:0px;">HTML code used to generate this article:</p>

<style>

div.WordSection1 {border: solid grey 1px; padding: 10px; height: 100px; width:540px; overflow:auto; background-color: ##E6E6E6;}

</style>

<div class="WordSection1">λ</div>

<p><b>Last Updated:</b> 4/21/2013 (article update, code cleanup & added new HTML)</p>

Last Updated: 4/21/2013 (article update, code cleanup & added new HTML)