Selecting Multiple Rows as a Single Column in SQL

Recently, I was writing a report that selected some data out of a normalized SQL Server database. For one of the queries, I needed a “flattened” form of the rows in one of the tables. In essence, what I needed to do was turn several rows of data into a single column.


SQL Bitwise Mask Example

SQL Script to Find Work Week Start and End

If you are looking for the Monday that starts a work week and/or the Friday that ends the work week, this is how you do it in SQL:

SQL Script to Find Last Day of the Month

This Microsoft SQL script figures out what the last day of the month is (28, 30, or 31) so that you don't have to recite the "30 days has September, April, May, and November..." poem or do the "knuckle trick."

Microsoft SQL Reporting Services URL Query Parameters and Commands

There are several parameters that can be passed in to the SRS Report viewer through query string parameters. Some of them are listed below:

Change the way it is rendered:
rs:Command=Render& (4 types of re:Commands)

Pass in parameter values:

Control the type of output:

Control what toolbar(s) show in the viewer: