look into pivot tables in the Books Online.  that'll do it.

you might also want to use an SP, they'll handle it faster.  return the data set of 
the pivot table to CF, and you're in.

christopher olive
cto, vp of web development, vp it security
atnet solutions, inc.
410.931.4092
http://www.atnetsolutions.com


-----Original Message-----
From: Timothy Heald [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 29, 2002 9:49 AM
To: CF-Talk
Subject: SQL Question


Hey folks,
        I have a table like this:

id      foreign id      value
1       1               1
2       1               2
3       1               3
4       2               1
5       2               2
6       2               3

        Regular old normalized table right?  Well I need to get it into columns
like this:

foreignID       value1  value2  value3
1               1               2               3
2               1               2               3

        Now I know it is possible, but difficult.  I would do it with CF but no
matter how high I set the time out in my administrator, and my web server it
times out, or says page cannot be displayed.  It is pulling huge amounts of
data, then outputting it it an Excel spread sheet.  We tried to do it with a
DTS package and the use SQL Mail to send it, but couldn't get that to work
reliably.

TIA.


Tim Heald
ACP/CCFD :)
Application Development
www.schoollink.net


______________________________________________________________________
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to