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

Andrej Šmigala (JIRA) issues at jboss.org
Tue Jan 2 10:01:00 EST 2018


Andrej Šmigala created TEIID-5195:
-------------------------------------

             Summary: 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: Steven Hawkins


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