Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Thank you Naomi.
Please see two inserts during one pass of the scan:
SELECT vBackgroundSubjectBilling_fk
SCAN FOR UPPER(ALLTRIM(vBackgroundSubjectBilling_fk.BSB_Status)) == "REQUEST FOR BILL"
*
* insert record into the export table file
*
lcBSB_Reason = LEFT(lcBSB_Reason, 50)
INSERT INTO (ADDBS(this.icWorkingDirectory) + "BillFile.dbf") (coid, clnum, pcdate, intotbill, deid, indesc, inglnum1, ;
inglamt1, inglnum2, inglamt2, Inmeth, stid, xfer, lgname, adddte, addtime, xxo_id, xxo_prefix, xxo_ref) ;
VALUES (lnCoid, lnCLNum, vBackgroundSubjectBilling_fk.BSB_IncurDate, vBackgroundSubjectBilling_fk.BSB_Cost, SPACE(0), ;
lcBSB_Reason , 0, 0, 0, 0, "BSO", SPACE(0), .F., oUser.GetUserInfo("USR_LANID"), DATE(), TIME(), ;
vBackgroundSubject_de.BSO_ID, "BSO", SPACE(0))
this.inBillFileSum = this.inBillFileSum + vBackgroundSubjectBilling_fk.BSB_Cost
this.inBillFileRowTotal = this.inBillFileRowTotal + 1
*
* insert a credit record into the export table file
*
INSERT INTO BillFile (coid, clnum, pcdate, intotbill, deid, indesc, inglnum1, ;
inglamt1, inglnum2, inglamt2, Inmeth, stid, xfer, lgname, adddte, addtime, xxo_id, xxo_prefix, xxo_ref) ;
VALUES (lnCoid, lnCLNum, vBackgroundSubjectBilling_fk.BSB_IncurDate, -vBackgroundSubjectBilling_fk.BSB_Cost, SPACE(0), ;
lcBSB_ReasonCredit , 0, 0, 0, 0, "BSO", SPACE(0), .F., oUser.GetUserInfo("USR_LANID"), DATE(), TIME(), ;
vBackgroundSubject_de.BSO_ID, "BSO", SPACE(0))
this.inBillFileSum = this.inBillFileSum - vBackgroundSubjectBilling_fk.BSB_Cost
this.inBillFileRowTotal = this.inBillFileRowTotal + 1
*
* advance BSB_Status to billed
*
llSuccess = this.oBiz.SetBillingStatus("Billed")
ENDSCAN
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement