Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
USE "F:\Jobs\Recurrentes\Interno\Client Since\Tablas\Import.dbf" IN 0 Alias clientaccounts
Exclusive
*!* edwkey = Identify the client
*!* ssn = Social security number Just for info
*!* Open_dt1 = Open date of the account
*!* close_dt1 = Close Date of the account
*!* status = O = Open C = Close Actual Status of the account
t1 = Seconds()
? "indexing data"
Index on edwkey tag xedwkey
Index on open_dt1 tag xopen_dt1 additive
Index on close_dt1 tag xclose_dt1 additive
Index on status tag xstatus additive
? "data indexed in ",Seconds()-t1," seconds"
t1 = Seconds()
? "determine open dates of active clients"
Select edwkey, Min(open_dt1) as minopen, Max(close_dt1) As maxclose;
From clientaccounts;
Group By edwkey;
Where status = 'O';
Into Cursor curActiveclients Readwrite
Local lnLoopcount
lnLoopcount = 0
Do While .T.
lnLoopcount = lnLoopcount + 1
Update curActiveclients set minopen = open_dt1 from clientaccounts;
where curActiveclients.edwkey = clientaccounts.edwkey;
and open_dt1 < minopen;
and close_dt1 between curActiveclients.minopen And curActiveclients.maxclose
If _tally=0
Exit
EndIf
EndDo
? "open dates determined in ",Seconds()-t1," seconds"
? lnLoopcount," loops needed"