3 Replies Latest reply: Nov 11, 2014 10:48 AM by rakesh goud RSS

    Undefined function 'If' in expression

    Paul Wonford

      Hi guys,

       

      I have a database I’m extracting information from using the code below

      ODBC CONNECT32 TO [MS Access Database;DBQ=H:\General - Shareplan\Ad-hoc\2014\Qlikview - live\Database.mdb];

      Milestones:
      sql select

      MilestoneDefID,
      ExpectedDate,
      CompletionDate,
      If(MilestoneDefID = 9,[ExpectedDate],) as [9 - expected]

      FROM [Milestone];

       

      It comes up with this error though.

       

      SQL##f - SqlState: 37000, ErrorCode: 4294964194, ErrorMsg: [Microsoft][ODBC Microsoft Access Driver] Undefined function 'If' in expression.

       

      I suspect it’s because I’m using an IF statement with a SQL select statement but I’ve searched the net and can’t come up with a solution.  Can anyone help?