I received following question in email : How to create a comma delimited list using SELECT clause from table column?
SQL SERVER – Example of DISTINCT in Aggregate Functions
Does DISTINCT in Aggregate Functions make a difference? Yes. A quick AdventureWorks example compares SUM(DISTINCT ReorderPoint) with a plain SUM.
SQL SERVER – Order Of Column In Index
Adding more columns does not make an index better. The order of column in index matters most, since an index is used only when its first column is in the query.
SQL SERVER – SQL SERVER – UDF – Get the Day of the Week Function Part 4
In Day of the Week Function Part 4, I answer why I write a UDF when DATENAME exists (I just like it) and show the one line DATENAME version.
SQL SERVER – Create Default Constraint Over Table Column
A DEFAULT constraint supplies a value when an INSERT omits the column. I test omitted values separately from explicit NULL.
SQL SERVER – UNPIVOT Table Example
UNPIVOT Table is the reverse of PIVOT. This AdventureWorks example turns state columns back into rows, and shows why the detail rows do not return.
SQL SERVER – SQL SERVER – UDF – Get the Day of the Week Function – Part 3
Nanda Kumar improved the UDF to get the day of the week: it now uses the date you pass in instead of GETDATE() and handles Saturday correctly.







