P
pincopallo_it
In my project I have a query like this:
query= "SELECT ID_STEZ, B.ID_PAR, B.VALORE WHERE
A.ID_STEZ = B.ID_STEZ AND B.ID_PAR = C.ID_PAR(+) AND A.ID_RET =
D.ID_RET AND A.ID_STEZ IN " +
stuz + " AND B.ID_PAR IN " + clim + " AND C.ID_PAR = B.ID_PAR"
which is perfectly working.
The variable stuz is like this : (12,45,64,85,127,476)
The variable clim is like this : (122,5,164,45,27,46)
The result of the query at the moment is stored in a TreeMap.
The problem is that if there is no data for clim (let's say) 5
i have not the column for clim 5
ResultSet rset = stmt.executeQuery (query);
result.setNumCols(rset.getMetaData().getColumnCount());
.... and the getColumnCount() don't consider the clim "5"
but I need a column for clim 5 as I have to fill the column
with "nodata" when I publish the web page !!!
How to solve it ????
query= "SELECT ID_STEZ, B.ID_PAR, B.VALORE WHERE
A.ID_STEZ = B.ID_STEZ AND B.ID_PAR = C.ID_PAR(+) AND A.ID_RET =
D.ID_RET AND A.ID_STEZ IN " +
stuz + " AND B.ID_PAR IN " + clim + " AND C.ID_PAR = B.ID_PAR"
which is perfectly working.
The variable stuz is like this : (12,45,64,85,127,476)
The variable clim is like this : (122,5,164,45,27,46)
The result of the query at the moment is stored in a TreeMap.
The problem is that if there is no data for clim (let's say) 5
i have not the column for clim 5
ResultSet rset = stmt.executeQuery (query);
result.setNumCols(rset.getMetaData().getColumnCount());
.... and the getColumnCount() don't consider the clim "5"
but I need a column for clim 5 as I have to fill the column
with "nodata" when I publish the web page !!!
How to solve it ????