Jeff Smith Blog

Random Thoughts & Cartesian Products with Microsoft SQL Server

Passing Arrays of Values as Parameters to Stored Procedures

I see many people have the need to pass in multiple pieces of information to stored procedures in a parameter, often as a CSV string. For example, you might have a stored procedure that will return customer info for all customer ID's passed in a CSV string, called something like this: Read more →

Using SQL to solve the "Sliding Tiles" puzzle

I just wanted to take a minute to highlight this thread in the sqlteam forums: http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=39736 It's really interesting stuff, and a bunch of us worked together to come up with some really cool ideas about using T-SQL to solve the classic sliding tile puzzle -- you know, where tiles on a square board are mixed up, with one missing, and you slide them around until the picture is complete or they are in the proper order. Read more →

Non-Deterministic UDF's – Custom Aggregate and Cumulative Functions

User Defined Functions (UDF’s) are just about my favorite thing in SQL 2000.I thought the possibilities to be endless, until I realized that they were designed to be completely deterministic:each call to a UDF with the same arguments should always return the same value, and during the evaluation of a UDF it cannot make any changes to the state of the database. Read more →

Two Words: Baseball

It's baseball season again and as many SQLTeamer's have probably discovered over the years, I'm a huge fan of the game. Living in Boston, of course my team of preference is the Red Sox which in itself can be quite a rollercoster ride. Read more →

ASP Report Class Northwind Sample

As promised, here's a sample ASP report from Northwind using my ASP Report Class (http://weblogs.sqlteam.com/jeffs/posts/526.aspx).  Hopefully, everyone will agree that the script is very easy to write and read and much shorter. Read more →