dibleya
07-01-2009, 10:40 AM
Hi All
Have a problem with the generated MQL statements generated with the MQL query editor and the ad hoc reporting tool on the Pentaho server.
To explain:
An SQL query like this works:
SELECT
"BT_ORDERS"."Customer" AS "COL0"
FROM
"Processing_Orders" "BT_PROCESSING_ORDERS"
but this does not:
SELECT
"BT_ORDERS"."Customer" AS "COL0"
FROM
"Processing_Orders" "BT_PROCESSING_ORDERS"
ORDER BY
COL0
The error reported on MQL query editor is:
ERROR: column "col0" does not exist
and the error on the server is:
AdhocWebService.ERROR_0012
and
Could not execute InMemorySolution
org.postgresql.util.PSQLException: ERROR: column "col0" does not exist...
I think that the problem here is that the MQL generator does not quote the COL0 alias which upsets postgres. From experimenting you can make the second query work by either quoting the COL0 in the ORDER BY or un-quoting the COL0 in the AS statement.
Unfortunatelythis makes it imposable to do any sorting and grouping of the data.
The connection I am using is JNDI, I have the "quote all" enabled.
Has any one else experienced this problem with postgres?
Many thanks in advance
AJ
Have a problem with the generated MQL statements generated with the MQL query editor and the ad hoc reporting tool on the Pentaho server.
To explain:
An SQL query like this works:
SELECT
"BT_ORDERS"."Customer" AS "COL0"
FROM
"Processing_Orders" "BT_PROCESSING_ORDERS"
but this does not:
SELECT
"BT_ORDERS"."Customer" AS "COL0"
FROM
"Processing_Orders" "BT_PROCESSING_ORDERS"
ORDER BY
COL0
The error reported on MQL query editor is:
ERROR: column "col0" does not exist
and the error on the server is:
AdhocWebService.ERROR_0012
and
Could not execute InMemorySolution
org.postgresql.util.PSQLException: ERROR: column "col0" does not exist...
I think that the problem here is that the MQL generator does not quote the COL0 alias which upsets postgres. From experimenting you can make the second query work by either quoting the COL0 in the ORDER BY or un-quoting the COL0 in the AS statement.
Unfortunatelythis makes it imposable to do any sorting and grouping of the data.
The connection I am using is JNDI, I have the "quote all" enabled.
Has any one else experienced this problem with postgres?
Many thanks in advance
AJ