Uploaded image for project: 'Teiid'
  1. Teiid
  2. TEIID-934

MySql Queries - SQL syntax error on pushdown queries when using functions like LPAD, REPLACE, etc

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 7.0
    • Fix Version/s: 7.0
    • Component/s: Query Engine
    • Labels:
      None

      Description

      Several CTC queries are failing in MySql when they are pushed down to the source. See query example and resulting SQL error below:

      SELECT INTKEY, LPAD(TIMESTAMPVALUE, 18) FROM BQT1.SmallA ORDER BY INTKEY

      Error Code:1064 Message:Error Code:1064 Message:Error occurred on connector MySQL_Push<5> - Error Code:1064 Message:You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') AS c_1 FROM smalla AS g_0 ORDER BY c_0' at line 1 Executing statement: [SQL: SELECT cast(g_0.INTKEY AS signed) AS c_0, LPAD(date_format(g_0.TIMESTAMPVALUE, '%Y-%m-%d %H:%i:%S.%f'), 18) AS c_1 FROM smalla AS g_0 ORDER BY c_0]

      The following fiunctions are producing "error in your SQL Syntax" errors:

      LPAD
      RPAD
      ASCII
      UCASE
      LCASE
      LOWER
      UPPER
      LEFT
      RIGHT
      LENGTH
      LOCATE
      LTRIM
      RTRIM
      REPEAT
      REPLACE

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                shawkins Steven Hawkins
                Reporter:
                wgibson Warren Gibson
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: