Posted on October 5, 2008 by codeslammer
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 [...]
Filed under: Data, Development, Tools | 8 Comments »
Posted on September 7, 2008 by codeslammer
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 [...]
Filed under: Data, SQL Server | 1 Comment »
Posted on September 2, 2008 by codeslammer
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 [...]
Filed under: Data, SQL Server | 1 Comment »
Posted on January 12, 2008 by codeslammer
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 [...]
Filed under: Data, Deployment | Leave a Comment »
Posted on September 21, 2007 by codeslammer
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 [...]
Filed under: Data, Performance, Technologies | Leave a Comment »
Posted on September 15, 2007 by codeslammer
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 [...]
Filed under: Data, Performance | Leave a Comment »