程序代码:
CLOSE TABLES
IF FILE([TTTT.DBF])
ERASE TTTT.DBF
ENDIF
SET SAFETY OFF
SELECT 2
USE TTT
IF NOT FILE([TTTT.DBF])
COPY STRUCTURE TO TTTT
SELECT 1
USE TTTT
ENDIF
SELECT 2
LOCAL DHRQ,KHMC,PM,BH2,MS2
DHRQ={}
STORE [] TO KHMC,PM,BH2,MS2
SCAN
BH2=编号2
MS2=码数2
SCATTER TO ATT
IF !EMPTY(B.编号)
INSERT INTO TTTT FROM ARRAY ATT
NREC=RECNO()
DHRQ=ATT(1)
KHMC=ATT(2)
PM=ATT(3)
ELSE
IF 订货日期=DHRQ AND ALLTRIM(客户名称)==ALLTRIM(KHMC) AND ALLTRIM(品名)==ALLTRIM(PM)
GO NREC
REPLACE 编号2 WITH BH2,码数2 WITH MS2 IN A
GO NREC+1
ELSE
INSERT INTO TTTT FROM ARRAY ATT
ENDIF
ENDIF
ENDSCAN
SELECT 1
BROWSE
图片附件: 游客没有浏览图片的权限,请
登录 或
注册