REPORTFORM;CH3.frf
TITLE;ทะเบียนเช็คจ่าย ตามรหัสธนาคาร วันที่เช็ค
SQL;drop table if exists _chkpay&
SQL;
SQL;create table _chkpay
SQL;select bktr.CHKNO, bktr.DOCNO, bktr.APACCID,
SQL;apmst.XCOMP, bktr.BANKID, bank.BANKNAME,
SQL;bktr.AMT_OUT, if(bktr.CLRCHK = 0,"N","Y") as XCRLCHK,
SQL;bktr.DATEPASS, bktr.DOCGL, bktr.DATECHK, bktr.CLRCHK
SQL;from bktr
SQL;left join apmst on bktr.APACCID = apmst.ACCID
SQL;left join bank on bktr.BANKID = bank.BANKID
SQL;where bktr.TRTYPE = "AP" and LEFT(bktr.PAYTYPE,2) = '02'
SQL;and BKTR.BANKID >= :m11 and BKTR.BANKID <= :m12
SQL;and BKTR.DATECHK >= :m21 and BKTR.DATECHK <= :m22
SQL;order by bktr.BANKID, bktr.DATECHK, bktr.CHKNO&
SQL;
SQL;update _chkpay inner join cashpay on _chkpay.docno = cashpay.docno
SQL;set _chkpay.xcomp = cashpay.xremark&
SQL;
SQL;select * from _chkpay order by BANKID, DATECHK, CHKNO
CONDITION;ตั้งแต่รหัสธนาคาร~BKTR.BANKID~Chr~2~SELECT BANKID FROM BANK~BANK
CONDITION;ตั้งแต่วันที่เช็ค~BKTR.DATECHK~Date~2~~
CONDITION;เงื่อนไข~~TextFile~~CH7.TXT~
EXCELSQL;drop table if exists _chkpay&
EXCELSQL;
EXCELSQL;create table _chkpay
EXCELSQL;select bktr.CHKNO, bktr.DOCNO, bktr.APACCID,
EXCELSQL;apmst.XCOMP, bktr.BANKID, bank.BANKNAME,
EXCELSQL;bktr.AMT_OUT, if(bktr.CLRCHK = 0,"N","Y") as XCRLCHK,
EXCELSQL;bktr.DATEPASS, bktr.DOCGL, bktr.DATECHK, bktr.CLRCHK
EXCELSQL;from bktr
EXCELSQL;left join apmst on bktr.APACCID = apmst.ACCID
EXCELSQL;left join bank on bktr.BANKID = bank.BANKID
EXCELSQL;where bktr.TRTYPE = "AP" and LEFT(bktr.PAYTYPE,2) = '02'
EXCELSQL;and BKTR.BANKID >= :m11 and BKTR.BANKID <= :m12
EXCELSQL;and BKTR.DATECHK >= :m21 and BKTR.DATECHK <= :m22
EXCELSQL;order by bktr.BANKID, bktr.DATECHK, bktr.CHKNO&
EXCELSQL;
EXCELSQL;update _chkpay inner join cashpay on _chkpay.docno = cashpay.docno
EXCELSQL;set _chkpay.xcomp = cashpay.xremark&
EXCELSQL;
EXCELSQL;select * from _chkpay order by BANKID, DATECHK, CHKNO
USECROSSTAB;N
CROSSTABFRF;N
CROSSTABHEAD;
CROSSTABFIELD;
