I am using SQL Server 2016 and I need to create a table (RoomInventory) in my database that will contain the following set of data which will be repeated for the period 01 January 2016 to 31 December 2016.
Here is how I want the final table to appear:
Date RoomType Property Inventory
2016-01-01 SUP JS 20
2016-01-01 DLX JS 15
2016-01-01 FAS FB 6
2016-01-02 SUP JS 20
2016-01-02 DLX JS 15
2016-01-02 FAS FB 6
-------------------------------------------
-------------------------------------------
2016-12-31 SUP JS 20
2016-12-31 DLX JS 15
2016-12-31 FAS FB 6
I know how to create the Table and how to insert data using the INSERT INTO
syntax but I have no clue as to how to write the proper syntax that will fill the DATE
column with the dates required.