6 Replies Latest reply: Nov 21, 2013 8:22 AM by Nihhal L RSS

    Exclude in script

    Tan Soo Chin
      NoStoreProductAProductBProductCProductDProductEAmount
      1StoreAAAAAA99
      2StoreAAFFFF2000
      3StoreAADDDD300
      4StoreAEEEVJ4000
      5StoreAETCCU800
      6StoreABBBBB999

       

      Hi Community,

      I want to exclude row1 and row 6, how should i put it in my script?

      LOAD No,

                Store,

                ProductA,

                ProductB,

                ProductC,

                ProductD,

                ProductE,

                Amount

      From Excel

      where not ProductA=ProductB=ProductC=ProductD= ProductE;

        • Re: Exclude in script
          Kaushik Solanki

          Hi,

           

               Try this.

           

          DATA:

          LOAD No,

               Store,

               ProductA,

               ProductB,

               ProductC,

               ProductD,

               ProductE,

               Amount,

               If((ProductA=ProductB) and (ProductB=ProductC) and (ProductC=ProductD)and (ProductD=ProductE)  ,1,0) as Flag

          FROM

          C:\Users\Kaushik\Desktop\Book1.csv

          (txt, codepage is 1252, embedded labels, delimiter is ',', msq);

           

           

          Data:

          Load No,

               Store,

               ProductA,

               ProductB,

               ProductC,

               ProductD,

               ProductE,

               Amount

          Resident DATA where Flag=0;  

           

           

          Drop table DATA; 

           

          Regards,

          Kaushik Solanki

          • Re: Exclude in script

            Hi,

             

            I would do sth like:

            WHERE replace(ProductA & productB, PorductC, ProductD, productE, productA, '') <> ''

            The advantage is that you can add a field very easily.

             

            Fabrice

            • Re: Exclude in script
              jagan mohan rao appala

              HI,

               

              Try like this

               

              DATA:

              LOAD No,

                   Store,

                   ProductA,

                   ProductB,

                   ProductC,

                   ProductD,

                   ProductE,

                   Amount

              FROM DataSource

              WHERE (ProductA=ProductB) and (ProductB=ProductC) and (ProductC=ProductD)and (ProductD=ProductE);

               

              Hope this helps you.

               

              Regads,

              Jagan.

              • Re: Exclude in script
                Nihhal L

                Hi SurynnChin,

                Try this

                 

                LOAD

                 

                No

                Store

                ProductA

                ProductB

                ProductC

                ProductD

                ProductE

                Amount

                FROM Excel file

                Where not No=1 and 6;