1
Good afternoon, I’d like to see the billing sum of two different dates(2018 x 2019, but I’m having trouble with the subselect "Details: "ODBC: ERROR [HY000] [Oracle][ODBC][Ora]ORA-00907: right parenthesis not found"
Select
Cast(SUM(VLRBRU) AS VARCHAR(20)) AS "Faturamento 2018",
(Select
Cast(SUM(VLRBRU) AS VARCHAR(20)) AS "Faturamento 2019"
FROM E140IPV
WHERE CODEMP=1 AND CODFIL=1 AND datger BETWEEN TO_DATE ('2019/01/01', 'yyyy/mm/dd') AND TO_DATE ('2019/12/31', 'yyyy/mm/dd') AND TNSPRO IN ('5101','5103','5904','6101','6109','6124','6401','6501','7101','5949A','6109D','6113','5501','6118');
)
FROM E140IPV
WHERE CODEMP=1 AND CODFIL=1 AND datger BETWEEN TO_DATE ('2018/01/01', 'yyyy/mm/dd') AND TO_DATE ('2018/12/31', 'yyyy/mm/dd') AND TNSPRO IN ('5101','5103','5904','6101','6109','6124','6401','6501','7101','5949A','6109D','6113','5501','6118')