8 Replies Latest reply on Aug 22, 2018 1:57 AM by Sankar achari

    split field values to columns

    Aldevinas Katkus


      I have tab separated file where one column "cost centers" contains cost centers separated by comma. Cost centers can have types, such as region, salesman, product. Types are defined in a separate table (text file) containing columns "cost center" and "type". The number of cost centers in the field "cost centers" is unknown and cost center sort order is unknown, so we cannot extract cost center value at a predefined position for a particular type of cost center. Is it possible to split the "cost centers" field value into columns by putting each cost center into its type column?


      JOHN,EAST,PIPES should create 3 columns SALESMAN, REGION, PRODUCT with values JOHN,EAST,PIPES accordingly (JOHN is of type SALESMAN, EAST is of type REGION)