SQL: ERROR [HY000] ORA-00923: FROM keyword not found where expected

Hi folks,

I have an SQL query that runs fine in Excel but erroring in UiPath per the subject. I tested the activity/connection in UiPath with a very simple query to be sure it works, so I guess it must be something wrong with my syntax. Can’t for the life of me see what though! Here it is:

select
el4 Cust_code,
c.customer_name,
sum(value1) total_os,
sum(value2) due_in_2_mnths_or_more,
sum(value3) due_next_month,
sum(value4) due_this_month,
sum(value6) “1MONTH”,
sum(value7) “2_MONTHS”,
sum(value8) “3_MONTHS”,
sum(value9) “4_MONTHS”,
substr(c.sales_office,1,2) BRANCH

from oas_ledgerbrs ledg, customer c

where
el4 = c.customer_account
and
ledcode = ‘SLEDGER ME’

group by
el4,
c.customer_name,
decode(c.status,0,‘Open’,1,‘REFER’,2,‘STOP’,‘DUNNO’),
substr(c.sales_office,1,2)

Any ideas would be most welcome, thanks!

Hello!
I have a similar problem, has anyone come across a similar one?
@Paul_Waine how did you solve your problem?