I have a rather unwieldy SQL query in Base (querying a rather unweildy MySQL 5.7 DB) that is used to generate a report.
The SQL of the query is:
SELECT workorders.ID workorderID, contracts.ID contractID, customers.NAME customerName, items.ID itemID, partnos.PARTNO partnoPartno, items.SERIALNO itemSerialno, reports.ID reportID, reports.CONFORMANCE reportConformance, CONCAT(COALESCE(REPORTSREV.FIRSTNAME, ''), ' ', COALESCE(REPORTSREV.LASTNAME, '')) reportReviewedby, results.ID resultID, calibrationfeatures.NAME resultName, calibrationfeatures.TYPE resultType, calibrationfeatures.NOMINAL resultNominal, calibrationfeatures.TOP resultTop, calibrationfeatures.BOTTOM resultBottom, results.UNCERTAINTY resultUncertainty, results.CONFORMANCE resultConformance, measurementdata.ID measurementdataID, measurementdata.ID measurementdataID, CONCAT(COALESCE(OPERATORS.FIRSTNAME, ''), ' ', COALESCE(OPERATORS.LASTNAME, '')) measurementdataOperator, measurementdata.DATE measurementdataDate, measurementdata.EQUIPMENT measurementdataEquipment, measurementdata.TEMPERATURE measurementdataTemperature, measurementdata.HUMIDITY measurementdataHumidity, CONCAT(COALESCE(RESULTSENT.FIRSTNAME, ''), ' ', COALESCE(RESULTSENT.LASTNAME, '')) measurementdataResultsentby, CONCAT(COALESCE(RESULTSREV.FIRSTNAME, ''), ' ', COALESCE(RESULTSREV.LASTNAME, '')) measurementdataResultsrevby
FROM WORKORDERS JOIN CONTRACTS ON
CONTRACTS.ID = WORKORDERS.CONTRACT JOIN CUSTOMERS ON
CUSTOMERS.ID = CONTRACTS.CUSTOMER JOIN ITEMSINWORKORDERS ON
ITEMSINWORKORDERS.WORKORDER = WORKORDERS.ID JOIN ITEMS ON
ITEMS.ID = ITEMSINWORKORDERS.ITEM JOIN RECEIVEDITEMS ON
RECEIVEDITEMS.ITEMINWORKORDER = ITEMSINWORKORDERS.ID JOIN PARTNOS ON
PARTNOS.ID = ITEMS.PARTNO JOIN CALIBRATIONFEATURES ON
CALIBRATIONFEATURES.PARTNO = PARTNOS.ID JOIN REPORTS ON
REPORTS.ITEMINWORKORDER = ITEMSINWORKORDERS.ID JOIN RESULTS ON
RESULTS.CALIBRATIONFEATURE = CALIBRATIONFEATURES.ID JOIN MEASUREMENTDATA ON
MEASUREMENTDATA.ID = RESULTS.MEASUREMENTDATA JOIN PERSONNEL RESULTSREV ON
RESULTSREV.ID = MEASUREMENTDATA.RESULTSREVBY JOIN PERSONNEL RESULTSENT ON
RESULTSENT.ID = MEASUREMENTDATA.RESULTSENTBY JOIN PERSONNEL OPERATORS ON
OPERATORS.ID = MEASUREMENTDATA.OPERATOR JOIN PERSONNEL REPORTSREV ON
REPORTSREV.ID = REPORTS.REVIEWEDBY
GROUP BY RESULTS.ID
ORDER BY WORKORDERS.ID, ITEMSINWORKORDERS.ID
Whenever I go to launch the report, I get:
The document âOverviewâ could not be opened.
Syntax error in SQL statement
But the Query runs fine. Help!? Is this a bug?
Oh, and this is my LO version info:
Version: 7.0.6.2 (x64)
Build ID: 144abb84a525d8e30c9dbbefa69cbbf2d8d4ae3b
CPU threads: 4; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: threaded