Re: dynamic table creation
Date: Fri, 01 Aug 2003 12:17:02 +0200
Message-ID: <bgdejv$1rd4$1_at_foka.acn.pl>
WOW .. great !
version of ORACLE 8.1.6
Let me describe whole situation. I need to create a raport I could
export and analyze in Excel.
query:
result:
Here is a query I have to "publish" in excel
select cf.sales_id, af.ACT_BASE_ID, count(*)
group by cf.sales_id, af.ACT_BASE_ID;
sales_id act_base_id count(*)
1 100 20
1 120 30
1 170 5
2 130 10
2 170 90
3 100 5
4 150 20
4 200 4
5 120 40
ETC. ETC.
so every sales (sales_id) has a few different activities (act_base_id)
and he make this activities a lot of times every day. I hope it's easy
and clear. But I need export this result to excel to a bit different
format. I could say format which my manager is able to understand ;)
Each line should contain one sales like that:
sales_id 100 120 130 150 170 200 1 20 30 5 2 10 90 3 5 4 20 4 5 40
is it clear ? I'm sure yes
So I need to create table which contains as many column as many name of activities there are on my table of activities. If I manage to create it I start fill this table cell by cell using two or three cursors I've already created
So ... what do you think ? Now is it clear ? Ir maybe You have other ideas how to convert "oracle result" to "excel sheet"
K.
Guido Konsolke wrote:
> "Krzys!" <krzys78_at_polbox.com> schrieb im Newsbeitrag
> news:bgd2nq$1oi5$1_at_foka.acn.pl...
>
>>True :-) I used to working with TSQL and I'm a begginer in Oracle. >>Anyway I try to figure out with temporary tables but if someone else >>have other suggestion how to solve my problem please help !!!! >> >> >>K.
>
>
> Hi Krzys,
>
> we would try to help you if you let us know what
> your problem is. Please elaborate. Oh: and
> include your dbms version (at least!).
>
> Greetings,
> Guido
>
>
Received on Fri Aug 01 2003 - 12:17:02 CEST