First off...apologies from a newb if I'm posting this in the wrong area...please tell me where to go (politely) and I'll post there :D

I have a JSP page which is using JSTL tags to retrieve data from an Oracle database and it's giving me some weird formatting issues which I can't seem to get resolved. I've been following most of the examples on how to format data in a table, but for some reason all my columns/data are not being displayed correctly.

My query looks like this:

Java Code:
<sql:query var="idata">
      SELECT batch_date        "Batch Date"
                 ,produced_vol    "MPRS Produced"
                 ,processed_vol   "MPRS Processed"
                 ,online_vol         "MPRS Online"
                 ,TO_CHAR(ecoes_date,'DD-MON-YYYY HH24:MI:SS') "ECOES Complete"
        FROM mprs_instr_counts
       WHERE batch_date >= SYSDATE -7
         AND mpid = 'SPOW'
       ORDER BY batch_date DESC
The actual presentation section looks like this:
Java Code:
  <%-- Get the column names for the header of the table --%>
  <c:forEach var="columnName" items="${idata.columnNames}">
    <th><c:out value="${columnName}"/></th>

  <%-- Get the value of each column while iterating over rows --%>
  <c:forEach var="row" items="${idata.rows}">
    <c:forEach var="column" items="${row}">
      <td><c:out value="${column.value}"/></td>
The output appears like this:

Java Code:

<blank column header>     Batch Date   MPRS Produced   <blank>    <blank>
07-OCT-2009 19:50:36      30598        16171                <blank>    <blank>
06-OCT-2009 22:55:31      44359        27871 
06-OCT-2009 00:28:07      75433        53256 
02-OCT-2009 22:23:47      45129        29073
As you may be able to see, the code is recognising that there are 5 columns worth of data to output, but it's getting the data mixed up with the headers, and missing headers and some data out alltogether.

The first column should be called BATCH_DATE, and as can be seen, the date *is* in the first column, but the actual header is blank and then the BATCH_DATE header appears in the *second* column with the wrong data!

It's driving me nuts...any suggestions anyone would be very much appreciated!