August 2009 - Posts

The Professional Association of SQL Server (PASS) is a great organization for SQL Server professionals, both DBAs and developers. Membership is free, and gets you many nice benefits for learning SQL Server and getting involved with the community. And the annual PASS Community Summits are some of the best conferences for getting deep into SQL Server with both Microsoft SQL Server team members and third party experts. (I'll be speaking again at this year's US summit the week of 2 November.)

This week, PASS is sponsoring 24 Hours of PASS, a virtual conference that will have 24 consecutive, hour long sessions. I'll be doing a session on SQL Server 2008 security at 21:00 GMT on Wednesday (2 PM PDT)--I hope I have that right! Other speakers are Adam Machanic, Andrew Kelly, Allen White, Artemakis Artemiou, Brad McGehee, Brian Knight, Dejan Sarka, Don Vilen, Erik Veerman, Gail Shaw, Grant Fritchey, Greg Low, Jacob Sebastian, Jessica Moss, John Welch, Kalen Delaney, Kevin Kline, Louis Davidson, Paul Nielsen, Peter Myers, Peter Ward, Simon Sabin, Steve Jones, Thomas Grohser. This is a truly international group!

Best of all, the sessions will be available later for viewing any time. So even if you're interested in a session that's at 2 AM where you are, you don't have to lose sleep.

I hope to see you there!

Don

Posted by DonK | with no comments

If you're reading this blog or hanging out with AppDev courseware, you're a tech person of some kind. By default, that almost certainly means that you are the technical support staff for your family, friends, and probably your neighbors (unless the neighborhood has a handy 13 year old).

Now, in one easy format and location, you can save yourself a lot of time and aggravation by pointing your tech support clients to this XKCD.com panel:

P.S. I love XKCD. When you view the cartoons on the Web site or the blog, make sure you hover your mouse over it to see the tooltip, which is often even more insightful or funny than the cartoon.

P.P.S. Below is the classic XKCD cartoon for people interested in SQL Server (or any SQL-based relational database) security. A year or two later, I still bust a gut laughing at this one!

Both of these cartoons are from XKCD, a webcomic of romance, sarcasm, math, and language. Add it to your RSS feed right now!

Posted by DonK | with no comments
Filed under: ,

While preparing for a SQL PASS a year or two ago when I was doing a session about common table expressions, I had endeavored to come up with an extremely simple recursive CTE. Unfortunately, I wasn’t creative enough at the time to come up with anything, so the attendees had to sit through more practical examples.

But later I revisited the problem, and came up with this:

WITH SimpleCTE(Number) AS
(
     SELECT 1
     UNION ALL
     SELECT * FROM SimpleCTE WHERE 0=1
)
SELECT * FROM SimpleCTE

No guarantees that I couldn’t get it even simpler, but this is the simplest I've ever seen. There may be another option for the SELECT * part of the CTE, but I’m not seeing it right now.

BUT! Obviously, this is the result of a thought experiment, and is not practical for anything else I can think of. Don’t take this as any kind of recommended practice!