Could you help me, pls repair following SQL statement, I have error in first line. Thanks
DECLARE @T_SYS_FROM SMALLINT,VARCHAR(8);
SET @T_SYS_FROM = 20200922,DATE;
SELECT
T_SYS_FROM,
N_D_AHDJ,
N_FUND_ID,
N_AHDJ,
T_SYS_USER,
BUDAT
FROM
dss.acn_ahdj_h
where
T_SYS_FROM=@ T_SYS_FROM
ORDER by
T_SYS_USER;
Your
DECLARElooks like you are taking the syntax from another SQL dialect because it isn't valid Oracle PL/SQL syntax.If you are using PL/SQL then something like (assuming that your query will return exactly one row):
If you want an SQL query then: