Building Crosstabs from Access to SQL Server
October 10, 2000
I had to do a Cross Tab today.
I had the code in MS/ACCESS as a
TRANSFORM statement and set about
creating a procedure to emulate it in
The main aim was to recreate the report that I had produced
and it does.
It should also do everything else that you
would expect of the
TRANSFORM statement and more.
It is in a very
embryonic state at the moment and will probably
There is no error checking so use the @debug option to see what is
going on behind the scenes.
I'd like to share the code for comments
and suggestions for
As with all my code the comments
are sparse and badly spelt.
Most of my procedures and tables live in a
database called common. I
prefer to place code in this database rather than
Partly because I can copy the common database from server to
Anyway here goes
Note the transform procedure requires the previously posted
Download the batch utility