[teiid-issues] [JBoss JIRA] (TEIID-5195) Osisoft translator - applying LIMIT on a UNION query causes syntax error

Ramesh Reddy (JIRA) issues at jboss.org
Mon Jan 8 10:25:00 EST 2018


     [ https://issues.jboss.org/browse/TEIID-5195?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ramesh Reddy reassigned TEIID-5195:
-----------------------------------

    Assignee: Ramesh Reddy  (was: Steven Hawkins)


> Osisoft translator - applying LIMIT on a UNION query causes syntax error
> ------------------------------------------------------------------------
>
>                 Key: TEIID-5195
>                 URL: https://issues.jboss.org/browse/TEIID-5195
>             Project: Teiid
>          Issue Type: Bug
>          Components: JDBC Connector
>    Affects Versions: 8.12.x-6.4
>            Reporter: Andrej Šmigala
>            Assignee: Ramesh Reddy
>
> Query such as 
> {code:sql}
> SELECT g_0.intkey FROM bqt1.smalla g_0 UNION SELECT g_1.intkey FROM bqt1.smallb g_1 LIMIT 100
> {code}
> fails with
> {noformat}
> [PIOLEDBENT] [SQL Parser] [Line 1:106] Syntax error at 'TOP'
> {noformat}
> because it is translated as 
> {code:sql}
> SELECT g_1.IntKey AS c_0 FROM dvqe..SmallA AS g_1 UNION SELECT g_0.IntKey AS c_0 FROM dvqe..SmallB AS g_0 TOP 100
> {code}
> notice the TOP 100 at the end, instead of right after the SELECT.



--
This message was sent by Atlassian JIRA
(v7.5.0#75005)



More information about the teiid-issues mailing list