I fear I already know the answer here, but here goes
I have a gigantic BAQ, consisting of 1 CTE, and 22 subqueries. The BAQ was constructed from working SQL code (this is a migration of an old Crystal Report that used an ODBC connection for a subreport).
I have completed the conversion from SQL to BAQ, the SQL code shown in the BAQ query window looks ok, but when trying it out, I get those nonsensical errors:
Incorrect syntax near 'm'. Incorrect syntax near 'SubAllBin'. Incorrect syntax near 'm'. Incorrect syntax near 'SubAllBin'. Incorrect syntax near 'SubAsOfTran'. Incorrect syntax near 'm'. Incorrect syntax near 'SubAllBin'. Incorrect syntax near 'SubAsOfQtyTran'.
Now, I know that the SQL code shown isn’t the actual query being executed. I am wondering if there is a way to capture the actual SQL being executed, in order for me to figure out where the problem is in the generated code?
Otherwise I am kind of at a loss as to how I am supposed to debug this…