Hello Team,
May i know main reasons for BAD SQL STATEMENT error in BAQ report? I suspect there is more than one. What if there are lots of data and join is OK? Same query when copied in SQL Server run perfectly.
Regards,
Hello Team,
May i know main reasons for BAD SQL STATEMENT error in BAQ report? I suspect there is more than one. What if there are lots of data and join is OK? Same query when copied in SQL Server run perfectly.
Regards,
There are many potential reasons, does the BAQ(s) behind the report execute w/o issue?
Not sure if it would present as “BAD SQL STATEMENT”, but a common problem that seems to pop-up on reports that normally run fine, is when a calculated field has a divide by zero. Maybe 99.9% of your data results in the divisor never being zero. But that 0.1% of the time, there would be an error.
Run the report again with different data (use different inputs (different date, customer, part, class, etc…). If it runs okay, then narrow it down to what is in your data that is causing the problem. Is it a specific date range, customer, part, Invoice Num, etc…
This is a little late, but in case someone ends up here through a search engine like I did, in addition to the division by zero error I have also gotten the Bad SQL Statement for:
Thanks Rabello,
For my case, Bad SQL Statement was a result of null value in the join statement. I added a criteria to prevent null values and problem solved.
Regards