hi there....
i need some help on sorting records in asp.....here is the scenario....
i've two fields "MonthBilled" and "Amout" stored in an access database.
It contains dummy data as:
MonthBilled Amount
------------- ---------
01-2004 1000
03-2004 800
02-2004 500
12-2003 700
I need to print the above info on an asp page in ascending order (to be sorted on monthbilled field) as:
MonthBilled Amount
------------- ---------
Dec-03 700
Jan-04 1000
Feb-04 500
Mar-04 800
Given below is the query tht i m using....
SQL="Select format(monthbilled, 'mmm-yy') as BillingMonth, sum(amt) as billamt from Billdet where billdet.billid like '"&strBillID&"' group by format(monthbilled, 'mmm-yy') order by format(monthbilled, 'mmm-yy')"
(strBillID = info passed from previous page)
Here is the output generated:
MonthBilled Amount
------------- ---------
Dec-03 700
Feb-04 500
Jan-04 1000
Mar-04 800
Any suggestions??????
i need some help on sorting records in asp.....here is the scenario....
i've two fields "MonthBilled" and "Amout" stored in an access database.
It contains dummy data as:
MonthBilled Amount
------------- ---------
01-2004 1000
03-2004 800
02-2004 500
12-2003 700
I need to print the above info on an asp page in ascending order (to be sorted on monthbilled field) as:
MonthBilled Amount
------------- ---------
Dec-03 700
Jan-04 1000
Feb-04 500
Mar-04 800
Given below is the query tht i m using....
SQL="Select format(monthbilled, 'mmm-yy') as BillingMonth, sum(amt) as billamt from Billdet where billdet.billid like '"&strBillID&"' group by format(monthbilled, 'mmm-yy') order by format(monthbilled, 'mmm-yy')"
(strBillID = info passed from previous page)
Here is the output generated:
MonthBilled Amount
------------- ---------
Dec-03 700
Feb-04 500
Jan-04 1000
Mar-04 800
Any suggestions??????