Actian Zen/Pervasive 中如何声明和使用日期变量?
我该如何解决
CREATE proc test1 ()
returns(TranDate integer, GLAcntNumber integer , Net decimal(39,19))
as BEGIN
DECLARE :StartDate DATE ;
SELECT CAST('2021-01-01' AS DATE) INTO :StartDate ;
SELECT :StartDate , GLAcntNumber, SUM(Net) AS Amt
FROM vGLBalances
WHERE period < 1
GROUP BY :StartDate, GLAcntNumber;
END