Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.
-
maquejp #1
Turning table to crosstable
Hello,
I would like to have advice...
I have a record set (cfquery) that return me something like:
3;5;3;0,0180889615127196
3;10;7;0,0422075768630123
3;15;13;0,0783854998884514
3;20;8;0,0482372307005855
3;25;3;0,0180889615127196
3;30;2;0,0120593076751464
3;35;2;0,0120593076751464
11;0;2;0,00253791969260717
11;5;37;0,0469515143132326
11;10;290;0,367998355428039
11;15;214;0,271557407108967
11;20;80;0,101516787704287
11;25;49;0,0621790324688756
11;30;27;0,0342619158501968
11;35;23;0,0291860764649824
11;40;18;0,0228412772334645
11;45;9;0,0114206386167323
11;50;1;0,00126895984630358
11;55;3;0,00380687953891075
11;65;1;0,00126895984630358
I would like to turn this result in a crosstab way
In column the 1st value, in line the 2nd value and the 3rd/4th value in the
cross of the 2 first...
Did any of you have already do this kind of stuff?
I am working on this but help will be great :)
maquejp Guest
-
Turning off audio?
Is there any way to turn off the audio on a game? I was playing around with the game at http://www.bubblebox.com/game/adventure/91.htm , and I'd... -
Turning a file into an ad
Hi there I really need some beginner help. I need to turn this file http://www.thefightmusic.com/f/header3.swf Into a 468*60 banner ad. Basically... -
THOSE OTF FONTS: TURNING 'EM OFF
OS 10.2.8 / dual 1-gHz / Illustrator CS: I normally use Suitcase (X1) to manage my fonts. I remove all extraneous fonts and keep them in a central... -
Could not load type VTFixup Table from assembly Invalid token in v-table fix-up table.
We are getting this error after clearing the web.config of database infomation - even after using the wizard to re-enter the information. I could... -
Turning string into a table
Is there a way to make for example: // (Column info) // String 1: ] ] // (Row) -
MikerRoo #2
Re: Turning table to crosstable
The question is not clear.
Given the posted record set, what exactly do you want displayed/returned?
Also, what DB are you using?
MikerRoo Guest
-
MikerRoo #3
Re: Turning table to crosstable
Here is one of millions of articles on cross-tab queries:
[url]http://www.databasejournal.com/features/mssql/article.php/10894_3516331_2[/url]
MikerRoo Guest
-
maquejp #4
Re: Turning table to crosstable
Well, it should look as:
| 3 | 11
------------------------
0 | - | 2
5 | 3 | 37
10 | 7 | 290
15 | 13 | 214
20 | 8 | 80
...
I have find "a solution" using queries of query; I have not the code to show
you here (at work) as I work on this at home.
But the main query should look:
Q1 = select fld1, fld2, sum(fld3), fld4 from thetable group by fld1, fld2
I do 2 qOq
Q2 = select distinct fld1col from Q1
Q3 = select distinct fld2 row from Q1
And finally, I:
loop q2
loop q3
query Q1 = select fld3 from Q1 where fld1=col and fld2 = row
My problem is that the dabases is only about 50000 records for the moment, but
will grow with the time (+at leat 50000 each year) and I thing that this will
be slow...
Database: Oracle 9i
maquejp Guest
-
maquejp #5
Re: Turning table to crosstable
Thank you! I will take a look to the link you provide to me...
I work with Oracle Database, but I am not familiar witth the concept of cube...
maquejp Guest



Reply With Quote

