How to change the sequence of source column

  • Hi All,

    I am working on 1 POC project.

    I have 2 customer having source file in txt format, but the column sequence of both customer are different.

    Number of column in all the files are same

    like below.

    CustA

    IDNAME AGE

    1VIPIN 29

    CustB

    IDAGENAME

    229jayesh

    As per source file you can see that CustA have column sequence ID,NAME,AGE and CustB HAVE ID,AGE,NAME sequence .

    I have target table #Temp with ID,NAME,AGE sequence.

    Like that I have many files from both customer, I have to load in ID,NAME,AGE sequence from all source file to target table.

    How can we change the sequence of source column before loading to target table

  • vipin_jha123 (11/3/2015)


    Hi All,

    I am working on 1 POC project.

    I have 2 customer having source file in txt format, but the column sequence of both customer are different.

    Number of column in all the files are same

    like below.

    CustA

    IDNAME AGE

    1VIPIN 29

    CustB

    IDAGENAME

    229jayesh

    As per source file you can see that CustA have column sequence ID,NAME,AGE and CustB HAVE ID,AGE,NAME sequence .

    I have target table #Temp with ID,NAME,AGE sequence.

    Like that I have many files from both customer, I have to load in ID,NAME,AGE sequence from all source file to target table.

    How can we change the sequence of source column before loading to target table

    Without editing the file, I don't see how you can.

    The absence of evidence is not evidence of absence.
    Martin Rees

    You can lead a horse to water, but a pencil must be lead.
    Stan Laurel

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply