4 Replies Latest reply: Oct 31, 2010 6:14 AM by Koen Tjoa RSS

    IF statement, compare a variable against a field value

       

      Hi All,

      I am trying to get an IF statement working where a variable is compared against a field value. My code is:

      SET MyLocalVariable = 'test';

      MyTable:
      LOAD Field1,
      Field2,
      Field3
      FROM
      MyTable.qvd] (qvd);

      IF MyLocalVariable <> Field1 THEN
      // Some more code
      //...
      Exit script;
      END IF


      Unfortunate this isn't working. In the IF statement Field1 seems to be NULL when checking in the debugger. I am sure that Field1 of the table is filled with a string value. No Unqualify is set.

      How can I make this statement work, e.g. compare a variable against a field value?

      Thanks,
      Korrelzeep