Author: vhalbert(a)redhat.com
Date: 2009-04-29 14:41:39 -0400 (Wed, 29 Apr 2009)
New Revision: 850
Modified:
trunk/server/src/main/java/com/metamatrix/metadata/runtime/spi/jdbc/JDBCTranslator.java
Log:
Teiid 538 - This fixes the invalid sql statement
Modified:
trunk/server/src/main/java/com/metamatrix/metadata/runtime/spi/jdbc/JDBCTranslator.java
===================================================================
---
trunk/server/src/main/java/com/metamatrix/metadata/runtime/spi/jdbc/JDBCTranslator.java 2009-04-28
22:25:48 UTC (rev 849)
+++
trunk/server/src/main/java/com/metamatrix/metadata/runtime/spi/jdbc/JDBCTranslator.java 2009-04-29
18:41:39 UTC (rev 850)
@@ -119,23 +119,18 @@
+ JDBCNames.VirtualDatabases.TABLE_NAME
+ WHERE
+ "{fn ucase("
+JDBCNames.VirtualDatabases.ColumnName.VDB_NM + ")}=?" //$NON-NLS-1$
//$NON-NLS-2$
- + AND +
JDBCNames.VirtualDatabases.ColumnName.VERSION_DATE + "=(" //$NON-NLS-1$
+
+ + AND +
JDBCNames.VirtualDatabases.ColumnName.VDB_VERSION + "=(" //$NON-NLS-1$
+ SELECT + MAX + "(" //$NON-NLS-1$
- +
JDBCNames.VirtualDatabases.ColumnName.VERSION_DATE +")" //$NON-NLS-1$
+ +
JDBCNames.VirtualDatabases.ColumnName.VDB_VERSION +")" //$NON-NLS-1$
+ FROM
+ JDBCNames.VirtualDatabases.TABLE_NAME
+ WHERE
- + "{fn ucase("
+JDBCNames.VirtualDatabases.ColumnName.VDB_NM + ")}=?" //$NON-NLS-1$
//$NON-NLS-2$
- + AND
- +
JDBCNames.VirtualDatabases.ColumnName.VDB_STATUS + "=" //$NON-NLS-1$
- + "(" + SELECT + MAX + "(" +
JDBCNames.VirtualDatabases.ColumnName.VDB_STATUS + ")" //$NON-NLS-1$
//$NON-NLS-2$ //$NON-NLS-3$
- + FROM
- + JDBCNames.VirtualDatabases.TABLE_NAME
- + WHERE
- + "{fn ucase("
+JDBCNames.VirtualDatabases.ColumnName.VDB_NM + ")}=?" //$NON-NLS-1$
//$NON-NLS-2$
+ + "{fn ucase("
+JDBCNames.VirtualDatabases.ColumnName.VDB_NM + ")}=? " //$NON-NLS-1$
//$NON-NLS-2$
+ AND + "(" +
JDBCNames.VirtualDatabases.ColumnName.VDB_STATUS + "=" + VDBStatus.ACTIVE
//$NON-NLS-1$ //$NON-NLS-2$
+ OR +
JDBCNames.VirtualDatabases.ColumnName.VDB_STATUS + "=" +
VDBStatus.ACTIVE_DEFAULT //$NON-NLS-1$
- +")))"; //$NON-NLS-1$
+ +") )"; //$NON-NLS-1$
+
public static final String SELECT_VIRTUAL_DATABASE_ID_LV
= SELECT +
JDBCNames.VirtualDatabases.ColumnName.VDB_UID + "," //$NON-NLS-1$
@@ -145,13 +140,13 @@
+ JDBCNames.VirtualDatabases.TABLE_NAME
+ WHERE
+ "{fn ucase("
+JDBCNames.VirtualDatabases.ColumnName.VDB_NM + ")}=?" //$NON-NLS-1$
//$NON-NLS-2$
- + AND +
JDBCNames.VirtualDatabases.ColumnName.VERSION_DATE + "=(" //$NON-NLS-1$
+ + AND +
JDBCNames.VirtualDatabases.ColumnName.VDB_VERSION + "=(" //$NON-NLS-1$
+ SELECT + MAX + "(" //$NON-NLS-1$
- +
JDBCNames.VirtualDatabases.ColumnName.VERSION_DATE +")" //$NON-NLS-1$
+ +
JDBCNames.VirtualDatabases.ColumnName.VDB_VERSION +")" //$NON-NLS-1$
+ FROM
+ JDBCNames.VirtualDatabases.TABLE_NAME
+ WHERE
- + "{fn ucase("
+JDBCNames.VirtualDatabases.ColumnName.VDB_NM + ")}=?"; //$NON-NLS-1$
//$NON-NLS-2$
+ + "{fn ucase("
+JDBCNames.VirtualDatabases.ColumnName.VDB_NM + ")}=? )"; //$NON-NLS-1$
//$NON-NLS-2$
//select objects
public static final String SELECT_VIRTUAL_DATABASES
Show replies by date