17 Replies Latest reply: Jan 29, 2016 2:43 PM by Sunny Talwar RSS

    Putting Single Quotes around each value separated inside of a parentheses

      I am loading variable values from a spreadsheet by looping through an excel file. The value column may have one or more values. I need each value to have a single quote around it regardless of how many values are present in the cell.

       

      LOAD
      Variable,
      chr(39)&Value&chr(39) as Value

       

       

      I am getting this

      Variable Name       Value

      v_variable1             '12345'

      v_variable2             '54321'

      v_variable3            '(13579,97531)'

      v_variable4            '(abcde,vwxyz)'

       

      What I want:

      Variable Name       Value

      v_variable1             '12345'

      v_variable2             '54321'

      v_variable3            ('13579','97531')

      v_variable4            ('abcde','vwxyz')

       

      Any ideas?