Jeff Smith Blog

Random Thoughts & Cartesian Products with Microsoft SQL Server

ASP - Report Class with Grouping, Headers, Footers and more

If you use ASP, ADO and SQL Server, check out my new article at: http://weblogs.sqlteam.com/jeffs/posts/526.aspx It includes code for a VBScript class which makes writing HTML reports based on an ADO recordset with group headers, footers, and subtotals extremely easy. Read more →

ASP Report Class

(Note: this is definitely an ASP topic, but because it relates directly to report-writing and using SQL Server easily and efficiently, I wanted to put an article here.) Regular old ASP with ADO works great for printing the contents of recordsets as web pages, and I know many of us out there still use these technologies. Read more →

Keep those SQL Crosstabs flexible!

I recently helped someone with performing some simple cross tabs (or pivots) in SQL, such as: Select CustomerID, SUM(CASE WHEN type = 'Land' THEN Amount ELSE 0 END) as Land, SUM(CASE WHEN type = 'Sea' THEN Amount ELSE 0 END) as Sea, SUM(CASE WHEN type = 'Air' THEN Amount ELSE 0 END) as Air FROM SomeTable GROUP BY CustomerID Read more →

Hello All !

This also is my first ever blog. Very nice! I am definitely looking forward to the content on this page, we've got some great people here and the posts should be informative and I'm sure quite entertaining as well! Read more →