3 Replies Latest reply: Jan 25, 2016 11:49 AM by Gysbert Wassenaar RSS

    Year command reading Oracle using Qlik ODBC Connector Package

    Alexis Hadjisoteriou

      Hi

       

      Just installed Qlik ODBC Connector Package and seems to work great.

      I wanted to load a large transactional table and limit it for all records since 1/1/2014.

       

      I started with:

       

      [Sales]:

      LOAD ITEM_CODE,

          M_SALESDATE,

          M_CARD_SEQ_NO,

      ........

      ;

       

      SELECT "ITEM_CODE",

          "M_SALESDATE",

          "M_CARD_SEQ_NO",

      ......

      FROM "SCORC"."TMP_ALL_SALES"

      WHERE YEAR("M_SALESDATE") > 2013

      ;

      and this produced the error:

        ERROR [42S22] [Qlik][ODBC Oracle Wire Protocol driver][Oracle]ORA-00904: "YEAR": invalid identifier

      "M_SALESDATE" is a datetime field
      I also tried with and without quotes for the field name.
      Next I tried the Oracle specific:

       

      WHERE EXTRACT (year FROM M_SALESDATE) > 2013

      and

      WHERE EXTRACT (year FROM DATE "M_SALESDATE") > 2013


      and got


      ERROR [HY000] [Qlik][ODBC Oracle Wire Protocol driver][Oracle]ORA-00936: missing expression

       

      So now I am running out of options - can someone help.

       

      Thanks in advance

      Alexis