L
Lars Schouw
Hi,
I want to sort the columns from my pivot crosstab query but don't know
how to do it!
The RAW data looks like this:
id groupname keyname value
A product xxx@1 1
B product xxx@33 2
C product xxx@10 3
D product xxx@53 4
E product xxx@59 5
The sql select statement
TRANSFORM First(value) AS FirstMyValue
SELECT id
FROM Bkascproplist
WHERE keyname like 'xxx@*'
GROUP BY id
PIVOT keyname;
returns
id xxx@0 xxx@1 xxx@10 xxx@99 xxx@2
A 2 4 3 1 5
But I would like not to have the columns sorted so that the result
looks like this
id xxx@0 xxx@1 xxx@2 xxx@10 xxx@99
A 2 4 5 3 1
Can anyone please help me here?
Lars
I want to sort the columns from my pivot crosstab query but don't know
how to do it!
The RAW data looks like this:
id groupname keyname value
A product xxx@1 1
B product xxx@33 2
C product xxx@10 3
D product xxx@53 4
E product xxx@59 5
The sql select statement
TRANSFORM First(value) AS FirstMyValue
SELECT id
FROM Bkascproplist
WHERE keyname like 'xxx@*'
GROUP BY id
PIVOT keyname;
returns
id xxx@0 xxx@1 xxx@10 xxx@99 xxx@2
A 2 4 3 1 5
But I would like not to have the columns sorted so that the result
looks like this
id xxx@0 xxx@1 xxx@2 xxx@10 xxx@99
A 2 4 5 3 1
Can anyone please help me here?
Lars