Forum Discussion

sbcict's avatar
sbcict
New Member
4 months ago
Solved

Replacing string values in a query column with values from another query

i have a column, titled "Expression", in a query table named "MOE" where each column row has a string of values separated by spaces, e.g. "A OR B OR C OR D AND NOT E", about 5000 rows long. i have a...
  • mickey64's avatar
    4 months ago

    For your reference.

    I'm not sure if this method will shorten the processing time.

     

    Step 0: I use these data below.

    <MOE>

     

    <Product>

     

    Step 1: I duplicate 'Expression' column.

     

    Step 2: I split 'Expression - Copy' column by space.

    <After>

     

    Step 3: I unpivot 'Expression -Copy.1-' - 'Expression -Copy.10-' column.

     

    Step 4: I merge queries and expand product..

    <After>

     

    Step 5: I remove 'Expression' column and 'Value' column.

     

    Step 6: I pivot column.

    <After>

     

    Step 7: I reorder columns.

     

    Step 8: I merge columns with space.

    <After>