summaryrefslogtreecommitdiff
path: root/reportbuilder
diff options
context:
space:
mode:
authorLionel Elie Mamane <lionel@mamane.lu>2011-01-20 11:54:23 +0200
committerTor Lillqvist <tlillqvist@novell.com>2011-01-20 11:55:28 +0200
commit6bd54fca68e01fb4178fd157822e7d64e79815cb (patch)
tree2ae2c0dc5ba9934243b90eb4e57e0d5af4c4f86a /reportbuilder
parentc7721a5243292af85fe98c37c9d2955a7b401328 (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.java4
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);