Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Monthly data into 12 columns

Status
Not open for further replies.

MDA

Technical User
Jan 16, 2001
243
US
Hi,

I have a query that pulls 12 months data for several records... How do I get the months to appear in a column format instead of row format?

Currently the syntax after the SQL is something like:

Month = rsGL.Fields("PERIODAMT")
Response.Write(&quot;<TR class=&quot;&rowcolor&&quot;> <td>&quot;&Month&&quot;</td> tr>&quot;)

What do I need to change? Do I need 12 SQL statements? Or perhaps an IF statement on the period?

Thanks for any ideas..

Regards,

MDA
 
Hi ...
have you tried this code ?

Response.Write &quot;<TR class=&quot;&rowcolor&&quot;>&quot; & VbCrLf
Do While Not rsGL.EOF

Month = rsGL.Fields(&quot;PERIODAMT&quot;)
Response.Write &quot;<td>&quot;&Month&&quot;</td>&quot;

rsGL.MoveNext()
Loop
Response.Write &quot;</TR>&quot; & VbCrLf
----
TNX.
E.T.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top