Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello.
Have a table containing customer and the first month they made movements. I need to generate from the date of each client the following months until now.
Example with the client that has number 1:
Cli First movement:
1 01.01.2012
Generate:
1 01.02.2012
1 01.03.2012
1 01.04.2012
1 01.05.2012
1 01.06.2012
1 01.07.2012
1 01.08.2012
1 01.09.2012
1 01.10.2012
and so with all customers.
Regards.
Check with this,
Datos:
LOAD Cli, Date#(Fec,'DD.MM.YYYY') AS Fec INLINE [
Cli, Fec
1, 01.01.2012
2, 01.12.2011
3, 01.03.2012
4, 01.05.2011
5, 01.07.2012
];
LOAD
Cli,
MonthStart(Fec,IterNo()-1) AS CustomerMovementDate
Resident
Datos
While MonthStart(Num(Fec),IterNo()-1)<=MonthStart(today());
Check with this,
Datos:
LOAD Cli, Date#(Fec,'DD.MM.YYYY') AS Fec INLINE [
Cli, Fec
1, 01.01.2012
2, 01.12.2011
3, 01.03.2012
4, 01.05.2011
5, 01.07.2012
];
LOAD
Cli,
MonthStart(Fec,IterNo()-1) AS CustomerMovementDate
Resident
Datos
While MonthStart(Num(Fec),IterNo()-1)<=MonthStart(today());
Hi!
This is perfect. Thank you very much.
Regards.