0 Replies Latest reply: Jan 22, 2015 6:27 AM by Peter Cammaert RSS

    Bug or feature: EXISTS() with non-existent first parameter

    Peter Cammaert

      I just spent a lot of time chasing a mapping table anomaly. The LOAD statement that creates the mapping table used an Exists() to only load mapping values for existing index values. Apparently the field specified as a first parameter didn't even exist and the engine simply creates an empty mapping table. No script error was generated and that message would certainly have helped me in finding my typing mistake a lot sooner...

       

      After thinking a while about this, I could only find one reason why the script engine fails to report an invalid parameter. A LOAD like this one (LOAD DISTINCT alternative) wouldn't be possible because when reading the first row, field A doesn't exist yet.

       

      Table:

      LOAD A, B, C, D FROM [ExternalFile.qvd] (qvd) WHERE NOT Exists(A);

       

      Is it like that?