• paul.ibison (3/6/2008)


    Brandon,

    all due respect but I think you're missing the point.

    Judging by some of the questions, some others (Jeff apart) have also never really tried to solve this problem in practice.

    Take a csv file with 50 columns and use your conditional split starting with a single column and see how long it takes. You'll have to define each of the 50 columns separately, and define the substring function separately for each one. In the example CSV file have no fixed width so your substring function will take account of looking for the commas, possibly nested inside a string. How long before this is robust? How tedious will it be to do all this coding? And the resulting code required will be huge.

    This method can do the same in an hour or so and have a very simple resultant package.

    Cheers,

    Paul Ibison

    Unfortunately in my line of work...a IT solutions vendor...it's part of my job to be a tedious coder. Again, with all due respect to you, I've never seen an example in practice of having header and trailer records along with field names.