In case you haven't found an example yet, in SQL Sever Books Online, select
the Index tab and enter 'rotated data'. Double-click on the highlighted
selection, and select Cross-tab Reports. That's the best example I've seen
anywhere.
Marianne Daye
Programmer/Analyst
Information Delivery Systems (IDS)
http://ids.rti.org
-----Original Message-----
From: Dave Watts [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 20, 2001 11:39 AM
To: CF-Talk
Subject: RE: SQL Cross-Tab / TRANSFORM
> We're using SQL 7 for all the database work, but we want to
> combine some tables (doing mods on a 3rd party program). We
> thought to use Transform/Pivot. That avoids running hundered
> of queries on a page (or even an additional 50) because of a
> funny table structure.
>
> We approched the problem by building the Transform Query in
> ACCESS (their little wizards!) and then utilizing it in the
> CF code to access the SQL7 server.
>
> So, that's how I can see the columns being properly named,
> but me hair is falling out at being inable to utilize the
> information. If it's a MS SQL 7 situation - then at least I
> know it's time to take a different approach!
You might try building a cross-tab query using T-SQL, instead. You can use
the CASE function for this. There's an example in SQL Server Books Online,
which you probably have installed on your SQL Server, or can get in Windows
HTML Help format here:
http://download.microsoft.com/download/SQL70/File/2/Win98/En-US/SQLBOL.exe
Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists