[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: May be [OT] ForEach Tag with expression returned fields.
Thanks all, the exclusion of the as key word worked fine (just aliasing with
a space seperating the field and the alias), I appreciate the help.
Bill
----- Original Message -----
From: "James Mitchell" <jmitchtx@telocity.com>
To: <ajug-members@ajug.org>
Sent: Wednesday, December 04, 2002 7:13 AM
Subject: Re: May be [OT] ForEach Tag with expression returned fields.
> 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
> >
> >
> >
>