Re: asp/sql looping problem
- From: "bbinto" <bbinto@xxxxxxxxx>
- Date: 17 Jan 2007 11:40:27 -0800
Thanks Daniel.
Really appreciate it and your hint made my day.
It all worked with Pivot tables and was after all so easy to print out.
Daniel Crichton wrote:
bbinto wrote on 17 Jan 2007 08:13:10 -0800:
i am new to asp/sql and of course, i have some problems with it.
please let me explain:
i have a problem with a sql result and its output in asp
my sql result table looks like this
there are 3 fix payment options I want to show always: Visa, Mastercard
and AMEX.
I would like to output this result table shown before as followed in
asp:
First sorted by city, then date, and then always followed by 3 fixed
columns for the payment types
City1 Visa Mastercard Amex
-------------------------------------------------------------------
1/1/2007 123.32 23.30 40.30
1/2/2007 - 12.30 234.20
I tried it with looping while checking if date and city changed.
however, every time i try it, i can't show it properly like the way i
want it.
Please, can somebody help?
If you need more information, please let me know.
thank you so much.
Look up "pivot" for the database system you are using, and it should give
you a start. What you want is a pivot table based on city+date, with payment
type as the column, and then you should find your loop much easier to
program.
Dan
.
- References:
- asp/sql looping problem
- From: bbinto
- Re: asp/sql looping problem
- From: Daniel Crichton
- asp/sql looping problem
- Prev by Date: Re: asp/sql looping problem
- Next by Date: Too few parameters. Expected 1.
- Previous by thread: Re: asp/sql looping problem
- Next by thread: Too few parameters. Expected 1.
- Index(es):
Relevant Pages
|