The CincyPass user group is alive and well thanks to Anthony Mattas (blog | twitter). I had the pleasure of not only attending my first meeting but also presenting at my first event of the year. The group wanted to hear my presentation on PIVOT and UNPIVOT, so I dusted off my “Blue-collar SQL: Building and Leveling [...]
Date-Time Math
It is October 20, Sweetest Day and Syntax Saturday. Yes, I finally got time to write another SQL syntax tip. No, it does not involve multiplying numbers with your date. Speaking of multiplying, my sweetest and I are expecting the newest addition to our family any day now. *smile* We are ready to discuss this [...]
Blue-collar SQL: How to Frame a Window
A cross-platform—Microsoft SQL Server, Oracle Database, and MySQL—perspective on SQL’s windowing functions and analytical OVER() clause and some of their more advanced capabilities or lack thereof. The journey to this presentation started last year at the Columbus PASS SQL Saturday. During my research, Jeremiah Peschka (blog | twitter), who coincidentally was a member of Columbus [...]
A Column Referencing Multiple Tables
Cold, ice, and snow surrounds me! Never-the-less, it is Syntax Saturday once again in Dayton. Today, I am writing about creating a column with multiple-table referential integrity in SQL Server. This comes up every now and again it seems. A few weeks ago, a user on Experts Exchange asked a question about having one column [...]
T-SQL Fun with DIR Command Line
Another hectic month for me, but it is once again Syntax Saturday in Dayton area. This month I am re-posting an answer I gave on Experts Exchange (http://rdsrc.us/XdDQ96) where the question Author needed to “clean up the results of a premature move to production of a small application.” To accomplish this cleanup, the Author needed [...]
Extensible Shredding with T-SQL
For this month’s Syntax Saturday, I do not have much time, but wanted to share two very useful XQuery extension functions introduced in SQL Server 2005′s enhancements in XML-support arena: sql:column() and sql:variable(). These functions can be used to spice up one’s XPath a bit. Consider shredding XML based on a variable or column value. Here [...]
SQL Tidbit: Quick XHTML Using SQL Server For XML
During the writing of this month’s Syntax Saturday post, I mocked up a table in HTML as a subnet mask reference. Ironically, after choosing not to use this table in the INET_ATON entry, I came across a forum question on how to take a bit of FOR XML output and format it as a HTML [...]
INET_ATON: IP Address to Number
Another Saturday in Dayton, hope everyone in the SQL community is doing well and those, returning from the PASS Summit travel safely. Today is busy as usual with the children, but I found some time to share another SQL tip. This Syntax Saturday is about converting IP addresses to numerical values for purposes of comparison. [...]
Month End Processing
In the first Syntax Saturday we talked about “what week is it?” Well, the answer may very well be “it’s month end processing week!” For those with a business of a decent size, you likely have written one or two month end related SQL scripts. But only a few. *smile* Okay. So I will at [...]
How to create XML files bcp: because copy’s possible!
Well, it is once SQL Saturday here in Dayton, Ohio. My apologies for missing last month. Hopefully, I will eventually finish that topic. For now, I wanted to share some tidbits on dynamically creating XML files in Microsoft SQL Server. First, as a refresher, SQL Server offers some nice capabilities to generate XML content from [...]







