diff options
author | Lionel Elie Mamane <lionel@mamane.lu> | 2011-01-20 11:54:23 +0200 |
---|---|---|
committer | Tor Lillqvist <tlillqvist@novell.com> | 2011-01-20 11:55:28 +0200 |
commit | 6bd54fca68e01fb4178fd157822e7d64e79815cb (patch) | |
tree | 2ae2c0dc5ba9934243b90eb4e57e0d5af4c4f86a /reportbuilder | |
parent | c7721a5243292af85fe98c37c9d2955a7b401328 (diff) |
Use more reliable SQL syntax
Give a derived table (subquery) an alias (name). From fdo#32960.
Signed-off-by: Tor Lillqvist <tlillqvist@novell.com>
Diffstat (limited to 'reportbuilder')
-rw-r--r-- | reportbuilder/java/com/sun/star/report/SDBCReportDataFactory.java | 4 |
1 files changed, 2 insertions, 2 deletions
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); |