Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello
I have this script and i would like to add a new column for "produccion" with the date from Fecha informe to be 7 days back.
Something like this:
Fecha Informe | Fecha Query | Produccion | Produccion-7 |
01/01/2022 | 01/01/2022 | 100 | |
02/01/2022 | 01/01/2022 | 150 | |
03/01/2022 | 01/01/2022 | 160 | |
04/01/2022 | 01/01/2022 | 170 | |
05/01/2022 | 01/01/2022 | 180 | |
06/01/2022 | 01/01/2022 | 160 | |
07/01/2022 | 01/01/2022 | 130 | 100 |
08/01/2022 | 01/01/2022 | 100 | 150 |
09/01/2022 | 01/01/2022 | 115 | 160 |
10/01/2022 | 01/01/2022 | 120 | 170 |
Thanks
LOAD
FechaInforme,
Hotel,
"Fecha Query",
ID_HABITA,
OriMer,
Region,
"Habitaciones Hotel",
"Habitaciones Bloq.",
"Habitaciones Disp.",
Habitaciones,
"Pax Query",
"Adultos Query",
"Niños Query",
Produccion
FROM [....../InformeDiario/pickup_ocupacion_canal.csv]
(txt, utf8, embedded labels, delimiter is ';', msq);
LOAD
ID_HABITA,
Habitacion,
Descripcion
FROM [...../Maestros/habitaciones.csv]
(txt, utf8, embedded labels, delimiter is ';', msq);
You can use peek(Produccion,-6) as "Produccion-7"
remember to order by FechaInforme