Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1226824

Summary: IN clause - teradata does not support "CAST( ... AS ...)" statement in "IN(...)"
Product: [JBoss] JBoss Data Virtualization 6 Reporter: Juraj Duráni <jdurani>
Component: TeiidAssignee: Van Halbert <vhalbert>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.2.0CC: atangrin, dlesage, vhalbert
Target Milestone: ER1   
Target Release: 6.3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
teradata version: 15
Last Closed: 2016-08-24 11:40:16 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Juraj Duráni 2015-06-01 08:53:15 UTC
The teradata DB does not support CAST statement in IN. Query (1), teradata exception (2), source specific command (3), query that teradata accepts (4).

(1) SELECT BQT1.SmallA.IntKey FROM BQT1.SmallA WHERE BQT1.SmallA.TimeStampValue IN (convert('2000-01-01 00:00:12.0', timestamp), convert('2000-01-01 00:00:45.0', timestamp)) ORDER BY IntKey

(2) SELECT g_0.intkey AS c_0 FROM smalla AS g_0 WHERE g_0.timestampvalue IN (cast('2000-01-01 00:00:12.0' AS TIMESTAMP(6)), cast('2000-01-01 00:00:45.0' AS TIMESTAMP(6))) ORDER BY 1

(3) SELECT g_0.intkey AS c_0 FROM smalla AS g_0 WHERE g_0.timestampvalue IN ('2000-01-01 00:00:12.0', '2000-01-01 00:00:45.0') ORDER BY 1

(4) Caused by: java.sql.SQLException: [Teradata Database] [TeraJDBC 15.10.00.05] [Error 3706] [SQLState 42000] Syntax error: expected something between ')' and ','.
at com.teradata.jdbc.jdbc_4.util.ErrorFactory.makeDatabaseSQLException(ErrorFactory.java:308)
...

Comment 1 JBoss JIRA Server 2015-06-02 21:48:10 UTC
Steven Hawkins <shawkins> updated the status of jira TEIID-3501 to Resolved

Comment 2 JBoss JIRA Server 2015-07-22 14:04:09 UTC
Steven Hawkins <shawkins> updated the status of jira TEIID-3501 to Reopened

Comment 3 JBoss JIRA Server 2015-07-22 16:51:34 UTC
Steven Hawkins <shawkins> updated the status of jira TEIID-3501 to Resolved

Comment 4 JBoss JIRA Server 2016-01-26 18:00:54 UTC
Steven Hawkins <shawkins> updated the status of jira TEIID-3501 to Closed