Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a data base with information about a Hotel reservations in the next format:
Hotel | Room Type | Check In | Check out |
X | Y | 01/01/2017 | 05/01/2017 |
And I need to transform each date in a line like this:
Hotel | Room Type | Check In | Check out |
X | Y | 01/01/2017 | 05/01/2017 |
X | Y | 02/01/2017 | 05/01/2017 |
X | Y | 03/01/2017 | 05/01/2017 |
X | Y | 04/01/2017 | 05/01/2017 |
X | Y | 05/01/2017 | 05/01/2017 |
Thank you !
Try like:
Load
Hotel, [Room Type], [Check out],
Date([Check In]+IterNo()-1) as [Check In]
While [Check In]+IterNo()-1<=[Check out] ;
Load * Inline [
Hotel, Room Type, Check In, Check out
X, Y, 01/01/2017, 05/01/2017]
Try like:
Load
Hotel, [Room Type], [Check out],
Date([Check In]+IterNo()-1) as [Check In]
While [Check In]+IterNo()-1<=[Check out] ;
Load * Inline [
Hotel, Room Type, Check In, Check out
X, Y, 01/01/2017, 05/01/2017]
Great!!
Works perfectly.
Thank you.