We are trying to get an excel document from a SQL Query and we are getting the following error:
We tried to rewrite the SQL sentences using quotes but it keeps failing the same way.
SQL Sentence: SELECT `ORDER_BY` AS `EMPLEADO`, `PLATO`, `IS_PAN` AS `PAN`FROM `SL_ORDERS` INNER JOIN `SL_LUNCH` ON `SL_ORDERS`.`LUNCH_ID`=`SL_LUNCH`.`ID`WHERE `SL_ORDERS`.`ID` IN ('1', '2') AND `SL_ORDERS`.`DIA_SEMANA`='1'We know the problem is from the SQL sentence because if we put a typical Select * table without anything else works, so everything else is fine in the input section.
Discussion posts and replies are publicly visible
You will have to wrap the sql in quotes only to pass it into the Sql node input. Is the script working on DB side? although it looks fine to me.
What is your data source? can you try to run it after removing backtick (`) everywhere from the query.I have personally used this smart service with MariaDB, MSSQL and Oracle as a data source and they all worked as expected.
I found a blank space at the start of some the data in one of the columns in the database. So I already fixed it using trim(data) but thanks for replaying.