Right Syntax for SQL-Report: Windows-Installationen
Hi all,
I don't find the error, what's the correct syntax for:
Subdivision in columns: [[],[]]
["SELECT DISPLAY_NAME, SOFTWARE.ID as TOPIC_ID FROM SOFTWARE WHERE ((DISPLAY_NAME like 'Microsoft Windows%')) ORDER BY DISPLAY_NAME","SELECT MACHINE.NAME AS SYSTEM_NAME, MACHINE.ID as TOPIC_ID, GROUP_CONCAT(DISTINCT REPORT_TEMP.TT1.ROW ORDER BY REPORT_TEMP.TT1.ROW) AS PARENT_ROW FROM MACHINE LEFT JOIN MACHINE_SOFTWARE_JT ON (MACHINE_SOFTWARE_JT.MACHINE_ID = MACHINE.ID) LEFT JOIN SOFTWARE ON (SOFTWARE.ID = MACHINE_SOFTWARE_JT.SOFTWARE_ID) JOIN REPORT_TEMP.TT1 ON (REPORT_TEMP.TT1.ID = SOFTWARE.ID) GROUP BY MACHINE.ID ORDER BY SYSTEM_NAME"]
Many thanks in advance
Answers (3)
When you take off
Subdivision in columns: [[],[]] as well as the [] within the body I think there is an extra set of ""
this validates:
SELECT
DISPLAY_NAME,
SOFTWARE.ID as TOPIC_ID
FROM
SOFTWARE
WHERE
((DISPLAY_NAME like 'Microsoft Windows%'))
ORDER BY
DISPLAY_NAME,
"SELECT MACHINE.NAME AS SYSTEM_NAME, MACHINE.ID as TOPIC_ID, GROUP_CONCAT(DISTINCT REPORT_TEMP.TT1.ROW ORDER BY REPORT_TEMP.TT1.ROW) AS PARENT_ROW FROM MACHINE LEFT JOIN MACHINE_SOFTWARE_JT ON (MACHINE_SOFTWARE_JT.MACHINE_ID = MACHINE.ID) LEFT JOIN SOFTWARE ON (SOFTWARE.ID = MACHINE_SOFTWARE_JT.SOFTWARE_ID) JOIN REPORT_TEMP.TT1 ON (REPORT_TEMP.TT1.ID = SOFTWARE.ID) GROUP BY MACHINE.ID ORDER BY SYSTEM_NAME"
So that might help you? Not with column names or anything but just as valid syntax.When I get stuck with brackets or format I will use an online syntax checker like SQL Query Optimizer Tool Online - Free Trial - EverSQL
Not a replacement for sql knowledge but it can help if you are stuck and can't find the error in syntax.
Hello everyone, thanks for your answer!
I want to build the report "Windows Installationen" in sql.
http://k1000/adminui/report_create.php?ID=395
http://k1000/adminui/analysis_sql_report.php?ID=395
When i duplicate and save the new report there cames a syntax-error.
When i eliminate the [[],[]] as well as the [] within the body and set the Syntax set to "", the syntax-error is gone but this is not the result of want I'm looking for.
To duplicate the report witch was build with the assistant is no problem. Now I have found another solution for my report with the assistent.