1 Reply Latest reply: Jul 1, 2014 6:07 AM by Tobias Meyer RSS

    combine as new table by columm description with several condition (script)

      Hi guys

      Ive got following script

       

      Load Date,

      Code1,

      Code2,

      Code3,

      If(Wildmatch(Code1,'T83400','Service') as Ser.A

      If(Wildmatch(Code1,'T83500','Buy') as Buy.A

      If(Wildmatch(Code2,'DE7011*','Sell') as Sell.A

      If(Code3="DE123" or Code3="DE124", 'New') as New.A

       

       

      Now I want a List with all the If()s that I've created like

      Type, Titel

      1,Service

      2,Buy

      3,Sell

      4,New

       

      which way is the best to list them?

      thx much

        • Re: combine as new table by columm description with several condition (script)
          Gysbert Wassenaar

          Create the field in the same load statement:

           

          Load Date,

          Code1,

          Code2,

          Code3,

          If(Wildmatch(Code1,'T83400'),'Service') as Ser.A,

          If(Wildmatch(Code1,'T83500'),'Buy') as Buy.A,

          If(Wildmatch(Code2,'DE7011*'),'Sell') as Sell.A,

          If(Code3="DE123" or Code3="DE124", 'New') as New.A,

          If(Wildmatch(Code1,'T83400'),'Service',

               If(Wildmatch(Code1,'T83500'),'Buy',

                    If(Wildmatch(Code2,'DE7011*)','Sell',

                         If(Code3="DE123" or Code3="DE124", 'New')))) as Titel

          From ....;