Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
I am back :)
Message
De
14/07/1999 10:58:55
Chuck Tripi
University of Wisconsin - Milwaukee
Milwaukee, Wisconsin, États-Unis
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
I am back :)
Divers
Thread ID:
00241244
Message ID:
00241244
Vues:
55
I have looked over the coding and test it, it seems to work, until recently, the actual live data is coming differently. What I am doing here in this DO CASE...ENDCASE is that this CASE is when there are two tables (a table and a cursor) have same number of records and then I need to compair side by side to see if either it is a "CHANGED" (would then be APPENDed to tab3) or "NO ACTION" (would then be APPENDed to tab2). I know we went thru this before, but this time I am overlooking something, so I need your help (furthermore, if you see something that can be improved or a better way of doing this, post it). Here we go...



CASE _tally = ct && (means both tables has same counts, so need to verify side-by-side)
exitloop=.F.
SELECT histpo
COPY TO histtemp FOR po = varpo && (to be able to DELETE recs in a table, not the live table)
USE histtemp IN 0
SELECT tempcur
COPY TO temptemp && (to be able to DELETE recs in a tables, not in a cursor)
USE temptemp IN 0
SELECT temptemp
GO TOP
DO WHILE NOT EOF()
SELECT temptemp
varclass = temptemp.class
varfund = temptemp.fund
varudds = temptemp.udds
varamount = temptemp.amount
varfy = temptemp.fy
varactivity = temptemp.activity
varaccount = temptemp.account
SELECT histtemp
GO TOP
DO WHILE NOT EOF()
IF histtemp.class = varclass AND ;
histtemp.fund = varfund AND ;
histtemp.udds = varudds AND ;
histtemp.amount = varamount AND ;
histtemp.fy = varfy AND ;
histtemp.activity = varactivity AND ;
histtemp.account = varaccount
DELETE
GO TOP
SELECT temptemp
DELETE
GO TOP
EXIT
ELSE
SKIP
IF EOF()
exitloop=.T.
EXIT
ENDIF
ENDIF
ENDDO
IF exitloop=.T.
EXIT
ENDIF
ENDDO
SELECT histtemp
COUNT TO tp1 FOR NOT DELETED()
USE
SELECT temptemp
COUNT TO tp2 FOR NOT DELETED()
USE
IF tp1 = 0 and tp2 = 0
SELECT tab2
APPEND FROM DBF("tempcur")
ELSE
SELECT tab3
APPEND FROM DBF("tempcur")
ENDIF
DELETE FILE histtemp.dbf
DELETE FILE temptemp.dbf
Today is tomorrow's yesterday.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform