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.
SELECT * FROM Temp GROUP BY acct_num order BY edwkey,open_dt1 ASC [b]INTO cursor[/b] myCursorName readwrite
If Tstatus = "C" Or Tstatus = "O" Then
If Between(TOpen,Vopen,Vclose) Then
If TClose > Vclose Then
Vclose = TClose
Endif
Else
If TOpen > Vclose Then
Vopen = TOpen
Vclose = TClose
Endif
Endif
If Tstatus = "O" Then
Exit
Endif
Endif
The catch is that during the life of the client doing business with the company they may be time when the client close all of the accounts and then came back later on, so the client since date that they want should be the open date of the first account since it last came onboard with the company
Select a1
scan
...
endscan
[code]
This will loop through all records of a1, no need to GOTO RECORD with each record number. You exit scan..endscan loops with Exit too.
Now let me see if I can come up with some sql replacing all this code.
Bye, Olaf.