Subject RE: [ib-support] Pivot table report
Author Çağatay Tengiz
It seems best solution is to use stored procedures or a temp table.

Thanks

Cagatay Tengiz

-----Original Message-----
From: Artur Anjos [mailto:arsoft@...]
Sent: Wednesday, November 14, 2001 2:35 AM
To: ib-support@yahoogroups.com
Subject: Re: [ib-support] Pivot table report



I use store procedures for this kind of data access. I use to have the
months also. If someone have a better solution let me know too!

Artur Anjos

----- Original Message -----
From: "Çağatay Tengiz" <tmd0307@...>
To: "Ib-Support" <ib-support@yahoogroups.com>
Sent: Tuesday, November 13, 2001 4:58 PM
Subject: [ib-support] Pivot table report


>
> Hi,
>
> Sıppose I've a sales table which has the fields of sale_amount, sale_month
> and sale_year.
>
> So data has the following format
>
> Year Month Amount
> ---- ----- ------
> 2001 1 100
> 2001 2 100
> 2002 1 300
>
> and my problem is, showing data like this format
> 1 2
> 2001 100 100
> 2002 300
>
> I'm using
> select year,
> (select amount from mytable mt where mt.year = mt00.year) as m1,
> (select amount from mytable mt where mt.year = mt00.year) as m2,
> .
> .
> .
> from mytable
>
> but this query takes too much time...
>
> is there any better SQL solution?
>
> Cagatay Tengiz
> cagatay.tengiz@...
>
> ~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-
> Tengiz Engineering & Consultancy
> www.tengiz.net
>
> Phone : +90 232 388 07 01
> Fax : +90 232 373 42 63
>
> Kazim Karabekir Cad. No:47/B 35040
> Bornova - Izmir / TURKEY
> ~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-
>
>
>
>
> _________________________________________________________
> Do You Yahoo!?
> Get your free @... address at http://mail.yahoo.com
>
>
>
> To unsubscribe from this group, send an email to:
> ib-support-unsubscribe@egroups.com
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/

>
>



To unsubscribe from this group, send an email to:
ib-support-unsubscribe@egroups.com



Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/


_________________________________________________________
Do You Yahoo!?
Get your free @... address at http://mail.yahoo.com