I am using SQL Server 2012
and I have a table called T1
(extract below) which contains around 100,000 records.
Property Room Season Datefrom Dateto Name
ABC LTD DLX P 01-01-2018 01-03-2018 John
XYZ LTD SUP P 01-01-2018 01-04-2018 Alan
I need a SQL query that will transform the data from this table T1
and give me the following output:
Property Room Season Date Name
ABC LTD DLX P 01-01-2018 John
ABC LTD DLX P 01-02-2018 John
ABC LTD DLX P 01-03-2018 John
XYZ LTD SUP P 01-01-2018 Alan
XYZ LTD SUP P 01-02-2018 Alan
XYZ LTD SUP P 01-03-2018 Alan
XYZ LTD SUP P 01-04-2018 Alan
How can I do this with a T-SQL query?