2 Replies Latest reply on Jul 30, 2012 6:03 AM by Johnreardon

    help needed in cleaning raw data with odd delimiters in it

      I am trying to write a sp, which adjust the number of columns based on the IN Parameter for the raw file.

      Raw (Id Int,RawData varchar2(5000))

      RawData has actual data with delimiter, this column has all the raw file imported as is.

      e.g. data in RawData Column


      Here above you can see the max number of delimiter are 5 for a 6 column table, however for some records there are less delimiter, here comes the problem

      For such records I want to add the extra delimter and take values for missing column as NULL or best would be''

      plz help me in writing Generic SP to clean this.

      We can pass the source & target table name and column names as a parameter, and create a clean table dynamically by name CleanedRaw etc.

      here the file is | delimited, actually It can have any single char delimiter or space or tab also. I am ok if we need to pass the delimiter also as a parameter to this sp