REPORTFORM;P.frf
TITLE;
SQL;SELECT INVCARD.*,ARCARD.*, ARMST.XCOMP, ARMST.XNAME, ARMST.TEL,ARMST.FAX,
SQL;ARMST.ADD_1, ARMST.ADD_2, ARMST.SHIPTO_1, ARMST.SHIPTO_2,ARCARD.DELITYPE,ROUTE.AREA1,
SQL;SALEMST.SNAME, JOBMST.JDESC, DEPART.DDESC
SQL;FROM INVCARD 
SQL;INNER JOIN ARCARD ON INVCARD.DOCNO = ARCARD.DOCNO
SQL;LEFT JOIN ARMST ON INVCARD.ACCID = ARMST.ACCID
SQL;LEFT JOIN ROUTE ON ARMST.ROUTE = ROUTE.ROUTE
SQL;LEFT JOIN SALEMST ON INVCARD.SALEID = SALEMST.SID
SQL;LEFT JOIN JOBMST ON INVCARD.JOBNO = JOBMST.JOBNO
SQL;LEFT JOIN DEPART ON INVCARD.DPTID = DEPART.DID
SQL;WHERE INVCARD.SUBSET = "N"
SQL;ORDER BY INVCARD.DOCNO,INVCARD.LINE
CONDITION;ตั้งแต่เลขที่เอกสาร~INVCARD.DOCNO~Chr~2~SELECT DOCNO FROM ARCARD WHERE LEFT(DOCNO,2) = 'IV'~
