Revert from a crosstab to a normal Table

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a table which is in the form of a cross tab in the form:

heading0 1 2 3 4
record1 a b c d
record2 a2 b2 c2 d2

and I want to convert it to:

heading0 Value
record1 a1
record1 b1
record1 c1
record1 d1
record2 a2

It is basically the opposite of a crosstab. Is it possible to do this as a
querries with using visual basic. I am using visual basic right now but it is
very slow.

Any ideas?

Thanks
 
Your samples are not consistent since a1 is a value anywhere in the first
sample.

You should be able to use a union query:
SELECT Heading0, [1] as Value
FROM tablewithnoname
UNION ALL
SELECT Heading0, [2]
FROM tablewithnoname
UNION ALL
SELECT Heading0, [3]
FROM tablewithnoname
UNION ALL
 
Back
Top