none
Transpose Data

    Question

  • Hi ,

    We have a requirement to write data to flat files.the challenge we are facing here is to transpose rows to columns when data not available .below is the scenario.

    we have the below table strucutre and while writing to the flat file we need to creted 12 columns for each emp if irrespective of if he is got data or not(i.e only jan and mar is acilable in table but we need to show all months with blank data )

    EMPID EMPNAme SAL
    100 abc JAN
    100 abc Mar

    Below is the result required in Flat fie.Mainframe system is expecting result in this format .could you please suggest the best method to achieve this or any articles on this

    EMPID EMPname Col1 Col2 Col3 Col4 Col5 Col6 Col7 Col8 Col9 Col10 Col11 Col12
    100 abc JAN FEB MAR APR MAY JUNE JULY AUGUST SEPTEMBER OCTOBER NOVEMBER DECEMBER

    Thanks

    Monday, November 04, 2013 5:12 AM

Answers

All replies