One query to find the First and Last Day of Current Month in SQL Server, plus the last day of the previous month and the first day of the next.
SQL SERVER – UDF – User Defined Function to Find Weekdays Between Two Dates
A user defined function that returns the number of weekdays between two dates, skipping Saturday and Sunday. It was written by Alexander Chigrik.
SQL SERVER – @@DATEFIRST and SET DATEFIRST Relations and Usage
How SET DATEFIRST changes the first day of the week, and how @@DATEFIRST returns the current value, which also changes with SET LANGUAGE. Simple examples.
SQL SERVER – Simple Cursor to Select Tables in Database with Static Prefix and Date Created
A simple cursor to select tables in a database by a static prefix like b_ or delete_ and by date created, so you can drop, print or index old tables.





