C
Cydney
I've created a Crosstab Query like this:
TRANSFORM First(Query1.ColE) AS FirstColE
SELECT Query1.ColA, Query1.ColB
FROM Query1
GROUP BY Query1.ColA, Query1.ColB
ORDER BY Query1.ColB, "COL" & Format(DCount("*","Query1","ColE<='" & [ColE]
& "'"),"000")
PIVOT "COL" & Format(DCount("*","Query1","SortOrd<='" & [SortOrd] &
"'"),"000");
Everythiing shows up great. My problem is with ColE. The "column" field --
Although it displays correct information, I need to get the "gaps" out of
there. So if the 2nd row doesn't have all the ColE information that the 1st
row has, I need to display them consecutively anyway.
NOT Like this:
ColA ColB COL017 COL034 COL036 COL050
somedata1 moredata Resource Data1 Resource Data2
somedata2 moredata Resource Data1 Resource Data2
somedata3 moredata Resource Data1 Resource Data2 Resource Data3 Resource Data4
somedata4 moredata Resource Data1
somedata5 moredata Resource Data2 Resource Data4
somedata6 moredata Resource Data3
somedata7 moredata Resource Data1 Resource Data2 Resource Data3
somedata8 moredata Resource Data1 Resource Data2
But LIKE This instead:
ColA ColB ResourceCOL1 ResourceCOL2 ResourceCOL3 ResourceCOL4
somedata1 moredata Resource Data1 Resource Data2
somedata2 moredata Resource Data1 Resource Data2
somedata3 moredata Resource Data1 Resource Data2 Resource Data3 Resource Data4
somedata4 moredata Resource Data1
somedata5 moredata Resource Data2 Resource Data4
somedata6 moredata Resource Data3
somedata7 moredata Resource Data1 Resource Data2 Resource Data3
somedata8 moredata Resource Data1 Resource Data2
Of course, when I define the column headings as ResourceCol1 (etc.), the
data goes away...
--
Thank you, cs
~~~~~~~~~~~~~~~~~~~~~~~~
"What lies behind us and what lies before us are tiny matters compared to
what lies within us."
~ Ralph Waldo Emerson
TRANSFORM First(Query1.ColE) AS FirstColE
SELECT Query1.ColA, Query1.ColB
FROM Query1
GROUP BY Query1.ColA, Query1.ColB
ORDER BY Query1.ColB, "COL" & Format(DCount("*","Query1","ColE<='" & [ColE]
& "'"),"000")
PIVOT "COL" & Format(DCount("*","Query1","SortOrd<='" & [SortOrd] &
"'"),"000");
Everythiing shows up great. My problem is with ColE. The "column" field --
Although it displays correct information, I need to get the "gaps" out of
there. So if the 2nd row doesn't have all the ColE information that the 1st
row has, I need to display them consecutively anyway.
NOT Like this:
ColA ColB COL017 COL034 COL036 COL050
somedata1 moredata Resource Data1 Resource Data2
somedata2 moredata Resource Data1 Resource Data2
somedata3 moredata Resource Data1 Resource Data2 Resource Data3 Resource Data4
somedata4 moredata Resource Data1
somedata5 moredata Resource Data2 Resource Data4
somedata6 moredata Resource Data3
somedata7 moredata Resource Data1 Resource Data2 Resource Data3
somedata8 moredata Resource Data1 Resource Data2
But LIKE This instead:
ColA ColB ResourceCOL1 ResourceCOL2 ResourceCOL3 ResourceCOL4
somedata1 moredata Resource Data1 Resource Data2
somedata2 moredata Resource Data1 Resource Data2
somedata3 moredata Resource Data1 Resource Data2 Resource Data3 Resource Data4
somedata4 moredata Resource Data1
somedata5 moredata Resource Data2 Resource Data4
somedata6 moredata Resource Data3
somedata7 moredata Resource Data1 Resource Data2 Resource Data3
somedata8 moredata Resource Data1 Resource Data2
Of course, when I define the column headings as ResourceCol1 (etc.), the
data goes away...
--
Thank you, cs
~~~~~~~~~~~~~~~~~~~~~~~~
"What lies behind us and what lies before us are tiny matters compared to
what lies within us."
~ Ralph Waldo Emerson