Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone.
Any help for this situation will be very preciated.
I need to read a resident table in each loop cycle, and when every loop ends, write a line in another resident table
I have done this, but the resulting resident table is empty
LET vFrom = Date(Now()-2); --> Starting date for the loop
LET vTo = Date(Now()); --> Ending date for the loop
LET vNow = vFrom; --> A flag to where am I
FOR vI = vFrom to vTo --> Loop
basenew: --> The table I must create, adding a line in each loop cycle
LOAD --> Load data from an existent/resident table "baseold"
$(vNow) as day,
service,
if((isnull(cancel) or cancel >= $(vAhora)) and suscribe <= $(vNow), 1, 0) as status --> Set 1 or 0 depending of dates condition
Resident baseold;
vNow = Date('$(vNow)'+1);
NEXT;
What I expect to have in "basenew" are lines like this
day | service | status |
2017-01-01 | service 1 | 1 |
2017-01-01 | service 2 | 0 |
.....
Thanks in advance
In you script is:
basefin:
LOAD *
Resident basenew;
The auto-concatenate feature will add the rows to the existing basenew table. A new "basefin" table will not be created.
Later in the script:
DROP Table basenew;
If you don't want the autoconcatenate, add the "NoConcatenate" keyword.
-Rob
could you post your app that we can see the data ?
Anna
Sure. I have attached qvw to the original post. Thanks!
Could you add from base.qvd ? it is not possible to reload it now
Done again. Little adaptation to bypass some sensitive data.
Tks!
In you script is:
basefin:
LOAD *
Resident basenew;
The auto-concatenate feature will add the rows to the existing basenew table. A new "basefin" table will not be created.
Later in the script:
DROP Table basenew;
If you don't want the autoconcatenate, add the "NoConcatenate" keyword.
-Rob
Tanks Rob. Your hints really helped me.
Regards