One of the more frequent questions I get for SQL Server is how to format a DATETIME into a specific date format. Here’s a summary of the different date formats that come standard in SQL Server as part of the CONVERT function. Following the standard date formats are some extended date formats that are often…
Year: 2010
New Job
After several months of consideration, I’ve changed jobs. I’m now at Wachovia in the university area. It’s much closer, My commute is just 12 miles now! I’m contract so there isn’t as much pressure to work long hours. And even with the additional protocols, I find more freedom in the ability to fully utilize the…
SQL 301 – GROUPING
In our previous lesson we covered WITH ROLLUP and WITH CUBE. During that lesson you may have noticed that when we saw the summary rows, the columns had NULL as the value. Hopefully you wondered to yourself, how do I know programatically which of the rows are summary lines and which are rows that just…
SQL 301 — WITH CUBE and ROLLUP
Have you been asked to summarize some data into a nice report for management? They want to see subtotals and grand totals you say? You don’t have to drop the results of your GROUP BY statement into a temp table, and summarize the subtotals yourself. The SQL ROLLUP and CUBE commands offer a valuable tool…