3 Replies Latest reply: Sep 1, 2014 4:18 AM by Ashfaq Mohammed RSS

    Change records in Access (accdb) load

      Dear fellow Qlikviewers,


      I've recently switched companies and am now working with MS Access in combination with Qlikview.

      Currently I have the following piece of script


      ODBC CONNECT32 TO [MS Access Database;DBQ=C:\Req_SRA01_Results.accdb];


          `Account Manager`,

          `Billed Weight`,

          `Commercial product`,

          `Legal Entity`,

          `Origin Country`,

          `Revenue Period`,


      if(mid('SVE_Group',8,3)='DFY','DFY',if(mid('SVE_Group',8,3)='EPL','EPL',if(mid('SVE_Group',8,3)='EPA','EPA',if(mid('SVE_Group',8,2)='SV','SV','?')))) as 'SVE_Group_2'


      FROM tblResults;


      The problem arises with the bold part. I try to add an extra record based on a record available in the ACCDB.

      However, when I try this, I get the following message:


      SQL##f - SqlState: 37000, ErrorCode: 4294964196, ErrorMsg: [Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression ''SVE_Group' if(mid('SVE_Group',8,3)='DFY','DFY',if(mid('SVE_Group',8,3)='EPL','EPL',if(mid('SVE_Group',8,3)='EPA','EPA',if(mid('SVE_Group',8,2)='SV','SV','?'))))'.


      Am I doing something wrong? Clearly I am, but what?

      Any help is appreciated.


      Kind regards,