From 6bd54fca68e01fb4178fd157822e7d64e79815cb Mon Sep 17 00:00:00 2001 From: Lionel Elie Mamane Date: Thu, 20 Jan 2011 11:54:23 +0200 Subject: Use more reliable SQL syntax Give a derived table (subquery) an alias (name). From fdo#32960. Signed-off-by: Tor Lillqvist --- reportbuilder/java/com/sun/star/report/SDBCReportDataFactory.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'reportbuilder') diff --git a/reportbuilder/java/com/sun/star/report/SDBCReportDataFactory.java b/reportbuilder/java/com/sun/star/report/SDBCReportDataFactory.java index 78ac17a7ba08..58ae07410da8 100644 --- a/reportbuilder/java/com/sun/star/report/SDBCReportDataFactory.java +++ b/reportbuilder/java/com/sun/star/report/SDBCReportDataFactory.java @@ -573,13 +573,13 @@ public class SDBCReportDataFactory implements DataSourceFactory final Boolean escape = (Boolean) prop.getPropertyValue(ESCAPEPROCESSING); rowSetProp.setPropertyValue(ESCAPEPROCESSING, escape); final String queryCommand = (String) prop.getPropertyValue(UNO_COMMAND); - statement = "SELECT * FROM (" + queryCommand + ")"; + statement = "SELECT * FROM (" + queryCommand + ") AS \"__LibreOffice_report_result\""; } } else { - statement = "SELECT * FROM (" + command + ")"; + statement = "SELECT * FROM (" + command + ") AS \"__LibreOffice_report_result\""; } } rowSetProp.setPropertyValue(UNO_COMMAND, statement); -- cgit