6 Replies Latest reply on Oct 21, 2011 3:32 PM by shawkins

    metamatrix to teiid transition - SQL syntax question

    fsauer65

      Hello,

       

      I am attempting to port all our metamatrix models over to teiid and am running into bizarre SQL parsing problems.

       

      this works:

       

      SELECT RTRIM(MED.BATDAT) as id

      FROM FCC.MEDMAS AS MED

       

      and so does this:

       

      SELECT substring(MED.BATDAT, 4, 4) as id

      FROM FCC.MEDMAS AS MED

       

      but this gives a parsing error:

       

      SELECT substring(RTRIM(MED.BATDAT), 4, 4) as id

      FROM FCC.MEDMAS AS MED

       

      [Error Code: 0, SQL State: 50000]  Remote org.teiid.api.exception.query.QueryParserException: Parsing error: Encountered "," at line 2, column 32.

      Was expecting one of:

          "and" ...

          "between" ...

          "from" ...

          "in" ...

          "is" ...

          "like" ...

          "like_regex" ...

          "not" ...

          "or" ...

          "similar" ...

          ...

       

      this seems so basic I must be doing something wrong. Interestingly, when I run this SQL against an EDS 5.1 installation it works fine but I don't know how to tell designer I am using EDS.

       

      Any ideas?

       

      Thanks,

       

      Frank Sauer