View Single Post
  #1 (permalink)  
Old March 6th, 2009, 04:02 AM
TComfort TComfort is offline
Registered User
Join Date: Mar 2009
Posts: 5
Thanks: 2
Thanked 0 Times in 0 Posts
Default Stored Procedure Quandry

Here's my problem:
I wrote a stored procedure that builds a big ole honking "SELECT, FROM, PIVOT" procedure, and then EXECUTEs it. It works great (and I can vary the output from 1 column to several hundred columns (depending on the series of dates worth of data that I need)).
I get the results in the output window. But, I need to CREATE a table (with the variable columns) from that output. I'm in way over my head and I know I got lucky when I made this procedure work. Is anyone interested in giving it a look? Thanks in advance.