Question : INSERT INTO  new table from existing stored procedure

Hello experts,

I have a standing stored procedure that when run returns a dataset for a report. My problem is that it takes a long time to run/finish and there are a lot of computed columns in the reports with aging buckets etc.

I want to produce a web-based report on just the output and store the output that will be created into a new table on a nightly job. That way I can simply run queries against with an ASP.NET 3.5 website. On even the smallest entity database it takes 20-30 seconds to return any out so I feel that's my best bet.  

I tried the following and I get an error message about not matching table definition. Since this job is going to first drop the table and then execute the SP, then output to the new table I sorta want it to work as if it was simply a "SELECT BLAH INTO [NEW TABLE]...
Is this possible or do I have to explicitly declare all the columns first then run the SP

SET ANSI_WARNINGS OFF
USE [MY_DB]
GO
INSERT INTO [My New Table]
EXEC [lsp_TheStoredProcedure]
 @_UAC_DateFrom = DATEPART(Y, -1, GETDATE())

SELECT * FROM  [lsp_TheStoredProcedure]
SET ANSI_WARNINGS ON

Any help would be greatly appreciated.

Answer : INSERT INTO  new table from existing stored procedure

This will work fine -- although it does have a built-in 2-port switch, it also works as a simple extender for the keyboard, video, and mouse signals:  http://sewelldirect.com/KVMcat5extender.asp

On the other hand, if you want to simply use extender cables, these will work IF you're using a PS/2 keyboard and mouse (USB cables can' be extended that far):
Monitor:  http://www.monoprice.com/products/product.asp?c_id=102&cp_id=10201&cs_id=1020103&p_id=3619&seq=1&format=2
Keyboard & Mouse  (You need two of these):  http://www.monoprice.com/products/product.asp?c_id=102&cp_id=10204&cs_id=1020401&p_id=2540&seq=1&format=2

The Cat-5 extender is a much "cleaner" solution, since you only need to string one simple Cat-5 cable.
Random Solutions  
 
programming4us programming4us