THE SQL Server Blog Spot on the Web

Welcome to SQLblog.com - The SQL Server blog spot on the web Sign in | |
in Search

Louis Davidson

Seasons Greetings.SQL

My family used to send out Christmas cards with a yearly report of "where we are from whenst we came from" report, but some years we depressed people, but too often it sounded like bragging. This year I could neither brag nor depress, for it has been a pretty even Steven kind of year. Some medical stuff, but had a really good year SQLwise. Kept the MVP, wrote some good blogs that will make up a chapter of my next design book, and finally hit a nice stride when speaking (big thanks to Paul Nielsen, as speaking with him has really helped me see what I did right (and wrong!)

But here at the end of the year, it is definitely the custom to send out cards to people. As a guy, I am not really into the whole “physical” card thing, but I like writing SQL. So I figured I would combine the greeting thing with the SQL thing. The following script, when run, will, Mad Libs style, spit out a personalized holiday message from me to you. A little personal, a little SQL.

If you are not so equipped to run the script, email me at louis@drsql.org and I will translate. Of course, I am more than happy to take any other types of messages there too (other than ones that pertain to my lottery winnings or any sort of personal products to enhance my life by emptying wallet. Those are right out.) For those who lack the desire to spend the effort, Merry Christmas, Happy New Year, etc. I love this community of SQL folks as a really interesting extended family (frankly I see a lot of you more than my family at various events :) But hey, if I was gonna say much more then the following SQL would be a waste of time, huh.

I will note, if you say you don’t celebrate Christmas, but you do believe in Santa Claus, you won’t cause your computer to burn up with a paradox, but I did default it to a lack of belief in Santa, cause frankly, I figure the largest contingency of my readers are the ones who have to buy the gifts, not wonder where they came from :)

See you in a week with my SQL New Year’s Resolutions!

declare @name varchar(30)
declare @celebrateChristmasFlag bit
declare @presentYouWant varchar(100)
declare @believeInSantaFlag bit

set @name = 'Friend' --<Your name here
set @celebrateChristmasFlag = 1
set @presentYouWant = 'Quad Core Netbook with eternal battery'
set @believeInSantaFlag = 0

set nocount on
select 'Hello ' + @name  +','
union all
select case when @celebrateChristmasFlag = 1 then
       CAST(0x4D65727279204368726973746D61732C204861707079204E6577205965617221 as varchar(40))
        else CAST(0x536561736F6E73204772656574696E677321 as varchar(30)) end
union all
select ''
union all
select CAST(0x492077616E7420746F207769736820796F7520616E6420796F7572732061207665727920686170707920686F6C6964617920736561736F6E as varchar(60))
union all
select CAST(0x66726F6D20616C6C206F6620757320617420647273716C2E6F7267202877656C6C206974206973206A757374206D652C207265616C6C7929 as varchar(60))
union all
select ''
union all
select CAST(0x5468616E6B20796F7520666F722072656164696E67206D7920626C6F672C20616E64204920686F706520796F752077696C6C20636F6E74696E7565 as varchar(60))
union all
select CAST(0x746F207265616420696E20746865206E657720796561722C20616E6420796561727320746F20636F6D652E204920686F70652074686174 as varchar(60))
union all
select CAST(0x796F7520676574207468617420 as varchar(20)) + @presentYouWant
union all
select case when @believeInSantaFlag = 1
       then CAST(0x66726F6D2074686520626967206A6F6C6C7920677579206E616D65642053616E746120436C61757321 as varchar(60))
       else cast(0x66726F6D20736F6D656F6E6520796F7520646F6E27742073686172652061206372656469742063617264207769746821 as varchar(60)) end
union all
select ''
union all
select cast(0x53656520796F7520696E2074686520636F6D696E6720796561722120204C6F756973 as varchar(60))

Published Wednesday, December 23, 2009 8:07 PM by drsql

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

 

Chris Missal said:

Thanks for the greetings! Even as a programmer (and not a DB guy) I can enjoy this! ;)

December 23, 2009 8:15 PM

Leave a Comment

(required) 
(required) 
Submit

This Blog

Syndication

Links to my other sites

Powered by Community Server (Commercial Edition), by Telligent Systems
  Privacy Statement