SQL Server 2008 Sample Databases

If you remember good ol’ NorthWind, you’ll know that having a sample SQL Server database can be great for sampling new technologies and performing RDBMS experiments and tests.  As much as detail-oriented presenters and trainers like to use NorthWind, it is an old sample from SQL Server 2000 that doesn’t have many of the new [...]

Non-Numeric Characters in SQL – Follow up

Although my previous post was a bit hasty, I wanted to follow up with some additional comments about the magic in the middle of the UDF created to remove any non-numeric characters from a column in a query result set.  As you can see there is a relatively cryptic body of the function that somewhat [...]

SQL Server String Manipulation – Removing Non-Numeric Characters

I recently had a need to get a distinct list of numbers from a freeform text field in a database.  After some analysis, my needs were met by the following approach:
CREATE FUNCTION dbo.UFNG_ONLY_DIGITS (@StrVal AS VARCHAR(max))
RETURNS VARCHAR(max)
AS
BEGIN
      WHILE PATINDEX(‘%[^0-9]%’, @StrVal) > 0
            SET @StrVal = REPLACE(@StrVal,
                SUBSTRING(@StrVal,PATINDEX(‘%[^0-9]%’, @StrVal),1),”)
      RETURN @StrVal
END
The function can then be used [...]

The Automatic DBA

You know, there is nothing like a painfully long set of SQL scripts that need to be applied to multiple databases to get the creative juices flowing. As I stared at a list of 29 scripts that needed to be applied to at least 2 different databases (it could be much worse), I thought [...]

JSON Lives

It has always been interesting to me how long it can take a technology to become truly rooted in the minds and toolsets of the software development community.  This mandatory waiting period for technological stability seems to be just long enough that most of the fads fall through the cracks.  Many tech buzzwords get thrown around, and there [...]

Data in the Cloud? Not For Me…

As I was cheerfully driving into work and auditorily inhaling my daily dose of .NET Rocks, I heard a rather compelling discussion between Scott Cate and Carl Franklin/Richard Campbell.

The site mentioned in the podcast was called Shoope, which I have to say is kind of a stupid name.  Partially, I may be thinking that name sucks [...]