6 Replies Latest reply: Aug 12, 2011 11:11 AM by Erich Shiino RSS

    Script help

    Chris Hopkins

      Hi, i am trying to do something in my script but i'm not sure how to do it..

       

      I am loading in a table with the following fields..

       

      PosTransactionDetail:

      LOAD

           StoreNumber,

           TransId,

           EANCode AS EAN,

           VATIndicator,

           VATAmountDue,

           VATBase,

           LineType,

           SaleStartDate

      FROM...

       

      But i don't want to load in any LineTypes which equal 'V' and any VATBase values less than '0'.

       

       

      Can anyone help me to achieve this please?

        • Script help
          Kaushik Solanki

          Hi, Try this.

           

              

          PosTransactionDetail:

          LOAD

               StoreNumber,

               TransId,

               EANCode AS EAN,

               VATIndicator,

               VATAmountDue,

               VATBase,

               LineType,

               SaleStartDate

          FROM xyz

          Where (not wildmatch(LineType,'v') or VATBASE >= 0);

           

          Regards,

          Kaushik Solanki

            • Script help
              Chris Hopkins

              Hi Kaushik Solanki,

               

              Thanks for your reply.. i think i have my original question wrong though. It seems that i do actually need some of the line type'v' included...

               

              What i need is to exclude linetype 'v' if they are greater than 0

               

              PosTransactionDetail:

              LOAD

                   StoreNumber,

                   TransId,

                   EANCode AS EAN,

                   VATIndicator,

                   VATAmountDue,

                   VATBase,

                   LineType,

                   SaleStartDate

              FROM xyz

               

               

              Where not wildmatch(LineType,'v') and <0 if that makes sense? So only include linetype v if a negative figure...

               

              How can i write that?