Me pueden ayudar a revisar el query y el error que me marca @meqs vi una respuesta tuya de alguien que tenía un problema similar, anexo código y error:
SELECT
A."AcctCode" AS "Código de Cuenta",
A."AcctName" AS "Nombre de Cuenta",
A."GroupMask" AS "Máscara de grupo",
SUM(
CASE
WHEN YEAR(T0."RefDate") < [%0] THEN T1."Debit" - T1."Credit"
ELSE 0
END
) AS "Saldo Inicial",
SUM(
CASE
WHEN YEAR(T0."RefDate") = [%0] THEN T1."Debit"
ELSE 0
END
) AS "Débito",
SUM(
CASE
WHEN YEAR(T0."RefDate") = [%0] THEN T1."Credit"
ELSE 0
END
) AS "Crédito",
SUM(
CASE
WHEN YEAR(T0."RefDate") = [%0] THEN T1."Debit" - T1."Credit"
ELSE 0
END
) AS "Saldo Movimientos",
SUM(
CASE
WHEN YEAR(T0."RefDate") <= [%0] THEN T1."Debit" - T1."Credit"
ELSE 0
END
) AS "Saldo Final"
FROM
"JDT1" T1
INNER JOIN "OACT" A ON A."AcctCode" = T1."Account"
INNER JOIN "OJDT" T0 ON T0."TransId" = T1."TransId"
WHERE
A."GroupMask" BETWEEN 1
AND 8
GROUP BY
A."AcctCode",
A."AcctName",
A."GroupMask"
ORDER BY
A."AcctCode";
El error es este:
Could not execute ‘SELECT A.“AcctCode” AS “Código de Cuenta”, A.“AcctName” AS “Nombre de Cuenta”, A.“GroupMask” AS …’
SAP DBTech JDBC: [339]: invalid number: not a valid number string ‘%0’