Here is the data used for the basic testing of TSQL Challenge 18
Input Data
Mth Yr ----------- ----------- 8 2009 2 1900 10 1959
Expected Output
+-----------------------------+ | FEBRUARY 1900 | |=============================| | Sun Mon Tue Wed Thu Fri Sat | |-----------------------------| | 1 2 3 | | 4 5 6 7 8 9 10 | | 11 12 13 14 15 16 17 | | 18 19 20 21 22 23 24 | | 25 26 27 28 | +-----------------------------+ +-----------------------------+ | OCTOBER 1959 | |=============================| | Sun Mon Tue Wed Thu Fri Sat | |-----------------------------| | 1 2 3 | | 4 5 6 7 8 9 10 | | 11 12 13 14 15 16 17 | | 18 19 20 21 22 23 24 | | 25 26 27 28 29 30 31 | +-----------------------------+ +-----------------------------+ | AUGUST 2009 | |=============================| | Sun Mon Tue Wed Thu Fri Sat | |-----------------------------| | 1 | | 2 3 4 5 6 7 8 | | 9 10 11 12 13 14 15 | | 16 17 18 19 20 21 22 | | 23 24 25 26 27 28 29 | | 30 31 | +-----------------------------+
Sample Script
Use the following TSQL script to generate the sample data
declare @t table (Mth int, Yr int) insert @t(Mth, Yr) select 8, 2009 insert @t(Mth, Yr) select 2, 1900 insert @t(Mth, Yr) select 10,1959 SELECT * FROM @t