4 Replies Latest reply: Jul 15, 2011 1:59 PM by Siarhei Karpusenka RSS

    How would I make the first row of a loaded table to be used as the fields' names?

      Hi,

       

      Pretty much, as it says in the topic, how would I use the first row as the fields' names for that table?

       

      Here's an example of what I mean:

       

      LOAD * INLINE [

          @1, @2, @3, @4

          Product, Jan, Feb, Mar

          p1, 10, 20, 30

          p2, 11, 21, 31

          p3, 12, 22, 32

      ];

       

      What I need to get out of this is:

       

      Product | Jan | Feb | Mar

      -----------------------------

      p1         | 10   | 20   | 30

      p2         | 11   | 21   | 31

      p3         | 12   | 22   | 32

       

      One of the ways I can think of is to STORE the table as a CVS and then re-load it as a new table with embedded headers, but that's not very elegant as this portion is in a nested loop.

       

      Thanks,

       

      Siarhei K.