[teiid-issues] [JBoss JIRA] (TEIID-3115) Invalid Query With OrderBy in SubQuery Table
Steven Hawkins (JIRA)
issues at jboss.org
Tue Apr 7 09:35:21 EDT 2015
[ https://issues.jboss.org/browse/TEIID-3115?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Steven Hawkins closed TEIID-3115.
---------------------------------
> Invalid Query With OrderBy in SubQuery Table
> --------------------------------------------
>
> Key: TEIID-3115
> URL: https://issues.jboss.org/browse/TEIID-3115
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Affects Versions: 8.8
> Reporter: Joseph CHIDIAC
> Assignee: Steven Hawkins
> Fix For: 8.7.1, 8.9
>
>
> Hi, I'm using Teiid Embedded Server , i tried to execute the Following query :
>
> SELECT jiraissue.issuetype
> FROM imOrganizationjiraissue jiraissue
> LEFT OUTER JOIN
> (SELECT jiraissue_sub.issuetype AS jiraissue_issuetype,
> AVG(
> TIMESTAMPDIFF(SQL_TSI_DAY,
> jiraissue_sub.CREATED,
> jiraissue_sub.RESOLUTIONDATE))
> AS CalculatedField
> FROM jiraissue jiraissue_sub
> GROUP BY jiraissue_sub.issuetype
> ORDER BY AVG(
> TIMESTAMPDIFF(SQL_TSI_DAY,
> jiraissue_sub.CREATED,
> jiraissue_sub.RESOLUTIONDATE)) ASC
> LIMIT 2) j_Sub
> ON jiraissue.issuetype = j_Sub.jiraissue_issuetype
>
> i verified the query sent to the JDBC [JDBCQueryExecution.java]
> SELECT g_0.issuetype
> FROM JIRADB.dbo.jiraissue g_0
> LEFT OUTER JOIN (
> SELECT TOP 2 g_1.issuetype AS c_0
> FROM JIRADB.dbo.jiraissue g_1
> GROUP BY g_1.issuetype
> ORDER BY anon_grp0.agg0
> ) v_0
> ON g_0.issuetype = v_0.c_0
>
> i got the following exception :
>
> java.sql.SQLException: The multi-part identifier "anon_grp0.agg0" could not be bound
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
More information about the teiid-issues
mailing list