2023 Mar 21 11:24 AM
DECLARE FromDate Date;
DECLARE ToDate Date;
FromDate:=/*select Min(T0.DocDate) from "ORCT" T0*/'[%0]';
ToDate:=/*select Max(T0.DocDate) from "ORCT" T0*/ '[%1]';
SELECT T0."DocDate",T0."DocNum", T0."CardCode", T0."CardName", T0."TrsfrAcct", T0."TrsfrSum", T0."Ref1", T0."Ref2", T0."Comments", T0."JrnlMemo", T0."TransId", T0."BoeNum", T0."PayToCode"
FROM ORCT T0;
2023 Mar 21 12:31 PM
Hi,
You miss the WHERE clause, try this:
DECLARE FromDate Date;
DECLARE ToDate Date;
FromDate:=/*select Min(T0.DocDate) from "ORCT" T0*/'[%0]';
ToDate:=/*select Max(T0.DocDate) from "ORCT" T0*/ '[%1]';
SELECT T0."DocDate",T0."DocNum", T0."CardCode", T0."CardName", T0."TrsfrAcct", T0."TrsfrSum", T0."Ref1", T0."Ref2", T0."Comments", T0."JrnlMemo", T0."TransId", T0."BoeNum", T0."PayToCode"
FROM ORCT T0
WHERE T0."DocDate" between :FromDate and :ToDate;
Hope this helps,
Son Tran