Re: [GENERAL] How to create crosstab with 3 values in every crosstab column

2012-02-06 Thread Marc Mamin
esql.org Subject: Re: [GENERAL] How to create crosstab with 3 values in every crosstab column Hi, Well, I think you will need to write your own function(s) which will solve your particular case... There are two ways explaind in last mails... Dynamic SQL or direct export to file...

Re: [GENERAL] How to create crosstab with 3 values in every crosstab column

2012-02-06 Thread Misa Simic
Hi, Well, I think you will need to write your own function(s) which will solve your particular case... There are two ways explaind in last mails... Dynamic SQL or direct export to file... Kind Regards, Misa 2012/2/6 Andrus > Thank you. > > > the point is - it is not possible to get unknown

Re: [GENERAL] How to create crosstab with 3 values in every crosstab column

2012-02-06 Thread Andrus
Thank you. the point is - it is not possible to get unknown no of columns in 1 SQL query... i.e. Account, Store, Amount 100, St1, 1000.00 100, St2, 2000.00 to get: Acount,St1 , St2 100, 1000.00 2000.00 to get that in your query... St1 and St2 - must be hardcoded... (is the

Re: [GENERAL] How to create crosstab with 3 values in every crosstab column

2012-02-06 Thread Misa Simic
Hi, I think you dont understand me (or I do not understand you :) ) the point is - it is not possible to get unknown no of columns in 1 SQL query... i.e. Account, Store, Amount 100, St1, 1000.00 100, St2, 2000.00 to get: Acount,St1 , St2 100, 1000.00 2000.00 to get that

Re: [GENERAL] How to create crosstab with 3 values in every crosstab column

2012-02-06 Thread Andrus
Thank you. first calculate how much columns we should return...No of stores in in your Sales table (multiply 3 in your case)... (and based on that - build the grid in UI) then with knowing that - we select full "table" with simple 3 functions: CalcSales(coount, Store), getBudget(account, Store)

Re: [GENERAL] How to create crosstab with 3 values in every crosstab column

2012-02-06 Thread Misa Simic
Hm... I am not sure it is possible at all and with just 1 column for crosstab (instead of 3) to return table with undefined No of columns (to number of stores do not be hardcoded)... At least you must define your return type... Problem is known to me, and we have solved it on some way... which i