Skip to content

Commit

Permalink
MONDRIAN: Fix DB2 drill through
Browse files Browse the repository at this point in the history
[git-p4: depot-paths = "//open/mondrian/": change = 9104]
  • Loading branch information
Sherman Wood committed Apr 13, 2007
1 parent 8e4164f commit c8fd255
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/main/mondrian/rolap/sql/SqlQuery.java
Expand Up @@ -379,7 +379,14 @@ public void addSelect(final String expression, final String alias) {
buf.append(expression);
if (alias != null) {
buf.append(" as ");
dialect.quoteIdentifier(alias, buf);
// If DB2, we normally don't quote identifiers in the queries because DB2 is
// case sensitive. In this case, though, we need to quote the column alias
// because it can be a name from the schema with spaces in it.
if (dialect.isDB2()) {
dialect.quoteIdentifier("\"" + alias + "\"", buf);
} else {
dialect.quoteIdentifier(alias, buf);
}
}

select.add(buf.toString());
Expand Down

0 comments on commit c8fd255

Please sign in to comment.