Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Code Support: ASP (Non-Forum Related)
 Grouping Data
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

kolucoms6
Average Member

845 Posts

Posted - 18 June 2007 :  14:48:31  Show Profile
I have a table with a column as ADate.

In my ASP page, I would like to display data in weekly format :

Week | Total | Pending | Passed | Failed
***************************************************************
11th June-17th June | 12 | 6 | 4 | 2
18th June-24th June | 10 | 4 | 4 | 2


Like wise...

Any Help ?

Edited by - kolucoms6 on 19 June 2007 00:24:35

kolucoms6
Average Member

845 Posts

Posted - 19 June 2007 :  02:10:43  Show Profile

Forgot to mention : there is another column as QC Status which can have 3 status :

1)PENDING
2)FAILED
3)PASSED

Go to Top of Page

pdrg
Support Moderator

United Kingdom
2897 Posts

Posted - 19 June 2007 :  12:50:11  Show Profile  Send pdrg a Yahoo! Message
Which DB? I believe SQL 2K5 should give you a TRANSPOSE function which would help you.

This is a classic problem, a 'vertical' recordset that you need 'horizontal' !
Go to Top of Page

kolucoms6
Average Member

845 Posts

Posted - 19 June 2007 :  12:55:00  Show Profile
MDB
Go to Top of Page

pdrg
Support Moderator

United Kingdom
2897 Posts

Posted - 20 June 2007 :  13:58:35  Show Profile  Send pdrg a Yahoo! Message
I think Access offers you a 'crosstab' query of some sort which will do this - it involves a bit of smoke and mirrors, but you may get it working.

Classically, you have to write the cursor code to loop and add, so if you can't crosstab it, fraid I can't help other than say you've got a couple of frustrating hours ahead - shame, but making tall datasets wide is a perpetual pain
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.24 seconds. Powered By: Snitz Forums 2000 Version 3.4.07