3 Replies Latest reply: Feb 7, 2017 5:07 AM by Avinash R RSS

    Load only data where exist

    Desmond Soh

       

      I have this table as shown above from loading. How to I just load those that the UserID is A9900899?

        • Re: Load only data where exist
          surendra j

          In Script

          Where clause

          where match(UserID,'A9900899');

            • Re: Load only data where exist
              Desmond Soh

              I got this table by running the script below.

               

              AccessControl:
              LOAD UserID,
              M_ENTITY,
              VALUE
              FROM
              Access.xlsx
              (
              ooxml, embedded labels, table is Sheet1);

              OUTER JOIN

              LOAD M_ENTITY
              FROM
              [Data\LNBR_2016-09-30.xlsx]
              (
              ooxml, embedded labels, table is DATA);

               

              How do I just load those that has UserID A9900899? I cant put the where match(UserID,'A9900899'); after the last load because they say UserID not found. please help thanks

                • Re: Load only data where exist
                  Avinash R

                  Try like this

                  AccessControl_temp:
                  LOAD UserID,
                  M_ENTITY,
                  VALUE
                  FROM
                  Access.xlsx
                  (
                  ooxml, embedded labels, table is Sheet1);

                  OUTER JOIN

                  LOAD M_ENTITY
                  FROM
                  [Data\LNBR_2016-09-30.xlsx]
                  (
                  ooxml, embedded labels, table is DATA);


                  AccessControl:

                  noconcatenate

                  LOAD *

                  resident

                  AccessControl_temp

                  where UserID='A9900899';


                  drop table AccessControl_temp;