Generate extract with varrying column size

  • Hi Frenz,

    I got a requirement from customer that I have to pick up some data from a table to generate a csv extract and ftp to server of another system. The required format is as follows -

    10, Mig_id

    30, remote_nni_1,procnni, tun. conc, lcn, status, baerer, DN

    30, remote_nni_1,procnni, tun. conc, lcn, status, baerer, DN

    30, remote_nni_1,procnni, tun. conc, lcn, status, baerer, DN

    30, remote_nni_2,procnni, tun. conc, lcn, status, baerer, DN

    30, remote_nni_2,procnni, tun. conc, lcn, status, baerer, DN

    30, remote_nni_2,procnni, tun. conc, lcn, status, baerer, DN

    90, Trailer record

    In the above format actual data are records starting with 30. Those records are being picked up from one table. I need to append 10 & 90 records at the top & bottom accordingly for error handling at the destination system.

    How can I do that? I could put them in one temp table and finally pickup from there. However that will generate unnecessary "," after Mig_id & Trailer.

    Can I do something with Transformation task? plzz help

  • I think BCP would be more useful in this situation. You can just write those two lines in BCP query to get appended in file. Moreover performance will also be good.:rolleyes:

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

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