See all products »
Curah! curation service
Microsoft Tech Companion App
Microsoft Technical Communities
Microsoft Virtual Academy
Server and Tools Blogs
TechNet Flash Newsletter
Cloud and Datacenter
Windows Server 2012 R2
System Center 2012 R2
Microsoft SQL Server 2012 SP1
Windows 8.1 Enterprise
See all trials »
Microsoft Download Center
TechNet Evaluation Center
Microsoft Virtual Academy
Free Windows Server 2012 courses
Free Windows 8 courses
SQL Server training
MCSA: Windows 8
Windows Server Certification (MCSE)
Private Cloud Certification (MCSE)
SQL Server Certification (MCSE)
Second shot for certification
Born To Learn blog
Find technical communities in your area
For small and midsize businesses
For IT professionals
For technical support
For home users
Microsoft Premier Online
Microsoft Fix It Center
Security Bulletins & Advisories
International support solutions
Log a support ticket
Not an IT pro?
Microsoft Customer Support
Microsoft Community Forums
Ward Pond's SQL Server blog
Ruminating on issues pertinent to the design and development of sound databases and processes under Microsoft SQL Server 2008, SQL Server 2005, and SQL Server 2000 (while reserving the right to vent about anything else that's on my mind)
Software Release Announcements
SQL Server 2000
SQL Server 2005
SQL Server 2008
T. Alexander Pond
TechEd Developers 2008
Browse by Tags
Ward Pond's SQL Server blog
Database Programming: A Prime Number Contender From Down Under
Denis' Prime Number Challenge just won't die. I think this topic has spurred more dialog than any other in this blog's 15-month, 180-odd post history. Just imagine if I could've harnessed this global outpouring of SQL skills for something with commercial potential.. J Rob Farley has two posts on his...
30 Sep 2006
Database Programming: Why I, Like, May Never Write Another LIKE, Like, Ever Again
[ UPDATE 30 October 2007 : There are significant ambiguities in this post which are addressed in the comments and in this follow-up , which I recommend reading after you've read this post and its comments. -wp] I've been doing some performance tuning work over the last couple of days, and I've found...
21 Oct 2007
See You Even More In Barcelona: Two Additional Chalk Talk Sessions Added
I'm pleased to report that the organizers of TechEd have scheduled repeat offerings of two of my sessions (so much for my earlier belief that the schedule was finalized *grin*): Set-Based Thinking for the T-SQL Developer: Insights from Microsoft IT will also be presented in Room 132, 3:45pm-5pm...
27 Oct 2007
Database Versioning Demonstration Uploaded
Fulfilling my promise at TechEd , I’ve finally completed a self-directed demonstration of the database versioning techniques I first presented at last year’s TechEd and which was alluded to during this year’s TechEd SQL Tricks presentations. It’s published here on my resource page at MSDN Code Gallery...
1 Dec 2008
IF EXISTS (SELECT..) vs. IF (SELECT COUNT(1)..) > 0
Consider this a coding tip for SQL Server 2000 (as well as a reason to upgrade), and kudos for the SQL Server 2005 development team. In SQL Server 2000, IF (SELECT COUNT(1)..) > 0 will process an entire table or index to complete the count, while IF EXISTS (SELECT..) will stop processing data when...
28 Aug 2007
Database Programming: The OPENROWSET Trick, Revisited
One of the most popular posts in the history of this little corner of the Internets is one from August, 2005, which describes a method for accessing stored procedure output in a SELECT statement which I’ve come to refer to as “ the OPENROWSET trick .” On the occasion of this blog’s 750th post(!),...
20 Mar 2009
Database Programming: (Almost) A Decrypter For Omni..
Omnibuzz saw my comment (I left another one over the weekend and it showed up right away; I wonder if the ones I left previously were eaten by some flavor of the issue I ran into trying to leave a comment here) and left two comments . Omni's first comment refers to the syntax I used to attack his...
21 Nov 2006
See You At Microsoft TechEd Developers 2007!
This news solidified last week, but it's taken me this long to get a spare moment to post it here. It's my pleasure to announce that I'll be moderating two interactive discussions at TechEd Developers 2007, November 5-9 in Barcelona, Spain. My discussions will be part of the Database Development track...
18 Sep 2007
Database Programming: Did You Know IN Can Do This?
Courtesy of Jens Suessmeyer comes this little gem purloined from an internal discussion; cut-and-paste this into SQL Server Management Studio and see if you can answer the questions in the comments before you execute the script: -- create and populate a table variable DECLARE @Demonstration TABLE...
5 Sep 2009
Database Programming: TOP Without ORDER BY?
Egad, a technical post! And after I'd already said goodbye for the month. A long time ago, a friend taught me that expectations are small murders. What does that make plans? At any rate, Peter asked a FAQ on one of the internal discussions this morning, and since we haven't discussed it here.. ...
19 Jul 2007
Pond's Seventh Law, Applied: Avoiding Random Elegance
Another application of Pond's Laws comes to light from an exchange on an internal SQL Server discussion list. My good friend and colleague John Huschka, a Senior Software Development Engineer for Microsoft Business Solutions' FRx Software Corporation, alerted me to this post on the list: I am...
30 Jul 2006
Database Programming: Everything You Always Wanted To Know About JOIN Semantics, But Were Afraid To Ask
Every once in awhile, I get an opportunity to look around for new and interesting things to read. With the emphasis my new position places on building world-class training resources for SQL Server types, I'll be spending even more time on this sort of research. Of course, I'll be sharing the best of...
13 Sep 2006
What I Know Now: Ward’s Epistle to the N00bs
And I remember what she said to me How she swore that it never would end I remember how she held me, oh so tight Wish I didn't know now what I didn't know then Bob Seger, Against the Wind All you need is love Love is all you need John Lennon and Paul McCartney, All You Need is Love My pal Jimmy May apparently...
15 Mar 2009
Database Programming: The String Concatenation XML Trick, Finalized
It's an especially Good Friday when we can close the loop on a technical conversation, and I believe that our modifications to The Technique That Lance Found , also discussed here and here , are complete. Scott Whigham left a comment on the most recent post offering an XML implementation that will...
21 Mar 2008
Database Programming: A Decrypter For Omni
This post will conclude (for me and for now, at least) a discussion begun here and continued here and here . When last we spoke, I was searching for a SQL Server 2000-specific decrypter for Omnibuzz . Well, I've got one. It might be a tad over-engineered for a production implementation (and performance...
22 Nov 2006
An Answer For Spazecaze: A Reasonable Method To Implement User Defined Fields
Spazecaze discovered a February, 2006 discussion of order of operations and poses the following question in its comment area : So how would you go about designing a database that allows for end user defined fields? For instance, a system is built to allow users to enter data into fields on...
21 Feb 2008
Two Pieces of Technical News from Kalen
Kalen Delaney has one of the most consistently informative SQL Server blogs in all of the Internets, and unless I miss my guess, it was also she who left the first of the very supportive comments I've received in the wake of my recent series of personal posts. Thank you, Kalen, and everyone else for...
26 Apr 2008
Database Programming: What I’ve Learned About SQL Server 2008 (with a little on SQL Server 2005 thrown in)
With SQLRAP 2.5 out the door a couple of weeks ago, I’ve been free to turn to another project, SIPA, an internal effort to automate storage and retrieval of our group’s diverse intellectual property catalog. I’m acting as both the database architect and one of the database implementers on the project...
27 Jul 2009
Database Programming: The String Concatenation XML Trick, Sans Entitization
When last we checked in on The Technique That Lance Found , Adam had noted that the method entitizes XML special characters, a state of affairs which limits its utility somewhat. I tried to leverage Tony Rogerson's technique , which Adam passed along in his comment, but it was late and I was tired...
19 Mar 2008
As Spring Approaches, a SQL Blogger’s Thoughts Turn to Daylight and Baseball
As we progress towards the Ides of March, one of my best friends-who-I’ve-never-met, Jimmy May , notes our annual transition to Daylight Savings Time , in a post he generously concludes with a link to one of this very blog’s oldies but goodies . In his blog’s title, Jimmy humbly refers to himself...
10 Mar 2009
Database Programming: Slaying The Time Zone Conversion Beast (or at least rendering it comatose)
Does anybody know what time it is? Does anybody really care about time? -Robert Lamm/Chicago One of the most vexing issues in developing and deploying global systems is handling time zone conversions among the various locales one is servicing around the world. While this might appear to be...
10 Jun 2006
MERGE, XML Access, and a CTE: Not So Fast
A bit of old news, as I return to the blog in earnest after some time away.. Last summer, in the posts Database Programming: What I’ve Learned About SQL Server 2008 (with a little on SQL Server 2005 thrown in) and Database Programming: Why I Like MERGE , I commented that I’d been able to build a MERGE...
7 Feb 2010
Database Programming: Denis' Prime Number Challenge
' Denis the SQL Menace ' read Wednesday night's post on "the million GUID march" and offered up a challenge of his own: How about the next challenge is to return all 78498 prime numbers between 1 and 1000000? What an interesting idea! Crazy, in a sense (I'll get to that in a second), like most...
23 Sep 2006
Microsoft TechEd Developers: New Session Added
Late-breaking news related to my earlier announcement that I'm presenting at next month's TechEd Developers 2007 in Barcelona: It's my pleasure to announce that I'll be moderating a third session, largely demo-oriented, called Version-stamping of Database Objects using SQLCMD and SQL Server Management...
12 Oct 2007
There's More To GO Than Meets The Eye
This little tidbit originated with Kalen Delaney , and was forwarded to me by Lance Larsen, a colleague here at Microsoft. I've verified that this works in all versions of SQL Server since SQL Server 2000 SP4. Here's Lance's note: I did not know about this feature until yesterday…could...
2 Oct 2007
© 2015 Microsoft Corporation.
Privacy & Cookies