[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: May be [OT] ForEach Tag with expression returned fields.
- To: ajug-members@ajug.org
- Subject: Re: May be [OT] ForEach Tag with expression returned fields.
- From: James Mitchell <jmitchtx@telocity.com>
- Date: Wed, 04 Dec 2002 07:13:08 -0500
- References: <010c01c29bb3$271c1bc0$47fcb2d0@woody>
- User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1) Gecko/20020826
Have you tried:
Select ReportProfile,Count(*) ct From Main_Database Group By ReportProfile;
^^
<td><c:out value="${row.ct}" /></td>
--
James Mitchell
Software Engineer / Struts Evangelist
http://www.open-tools.org/
Bill Woodson wrote:
>Hi All,
>
>I apologize if this is off topic, it does deal with a facet of Java, so here it goes. I am trying to write a JSP that is a report from a database. The Query looks like this:
> Select ReportProfile,Count(*) From Main_Database Group By ReportProfile;
>
>I don't know how to print the second field which is the result of the Count function. In other words my code looks something like this
> <c:forEach var="row" items="${resultQuery.rows}" >
> <tr>
> <td><c:out value="${row.ReportProfile}" /></td>
> <td><c:out value="${???What goes here????}" /></td>
> </tr>
> </c:forEach>
>
>MS SQL Server uses an AS keyword for aliasing the field, but that apparently is not proper in The java implementation.
>
>Any help would be greatful, Thanks.
>Bill
>
>
>