3 Replies Latest reply: Sep 23, 2015 6:01 AM by Neal Bouwman RSS

    Why does my where not exists() act unlike I want?

    Neal Bouwman

      Hi All,


      See script below. I first load a table from xlsx where I defined special users (USERID) that can see multiple USERPROFILERS, then I pull data from a qvd with all users and only want to add those users to the above table that have not been already mentioned there. I tried to do this with where not exists, but is does not seem to work and I get only those users that actually do exist in the upper table (as if I used where exists() function)


      Please help!


      section access;

       

      Users:

      LOAD ACCESS,

      upper(USERID) as USERID,

      upper(USERPROFILER) as USERPROFILER

      FROM

      $(vPathINPUT)Section Access.xlsx

      (ooxml, embedded labels, table is [SECTION ACCESS])

      where 1 = 1;

       

      Concatenate (Users)

      Load *,

      USERID2 as USERID

      where not Exists(USERID, USERID2)

      ;

      LOAD 'USER' as ACCESS,

      'TEVANL\'&upper(USERPROFILER) as USERID2,

      upper(USERPROFILER) as USERPROFILER,

      upper(USERBUSINESSUNIT) as USERBUSINESSUNIT

      FROM

      $(vPathQVD_DM_SFE)DM_SFE_DataProfiler.qvd

      (qvd)

      where USERBUSINESSUNIT <> 'Team A';