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

Redshift - there is not function SUBSTR (RS uses SUBSTRING)

    XMLWordPrintable

Details

    • Hide

      Query: SELECT INTKEY, LEFT(INTKEY, 2) FROM BQT1.SmallA ORDER BY INTKEY
      Source-specific query: SELECT g_0.intkey AS c_0, SUBSTR(cast(g_0.intnum AS varchar(4000)), 1, 1) AS c_1 FROM smalla AS g_0 ORDER BY c_0

      Show
      Query: SELECT INTKEY, LEFT(INTKEY, 2) FROM BQT1.SmallA ORDER BY INTKEY Source-specific query: SELECT g_0.intkey AS c_0, SUBSTR(cast(g_0.intnum AS varchar(4000)), 1, 1) AS c_1 FROM smalla AS g_0 ORDER BY c_0

    Description

      Postgresql translator uses SUBSTR function to get substring of string (e.g. function LEFT(x,y)), but Redshift does not support function SUBSTR. It support SUBSTRING function instead.

      Attachments

        Issue Links

          Activity

            People

              rhn-engineering-shawkins Steven Hawkins
              jdurani Juraj DurĂ¡ni (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: