Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
jassie
Constraint Violating Yak Guru
332 Posts |
Posted - 2014-05-08 : 17:22:53
|
I would like to know if the following sql can be used to obtain specific columns from calling a stored procedure with parameters:/* Create TempTable */CREATE TABLE #tempTable (MyDate SMALLDATETIME, IntValue INT)GO/* Run SP and Insert Value in TempTable */INSERT INTO #tempTable (MyDate, IntValue)EXEC TestSP @parm1, @parm2If the above does not work or there is a better way to accomplish this goal, please let me know how to change the sql? |
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2014-05-08 : 17:30:28
|
The temp table definition has to match the stored procedure output. If the stored procedure is returning 100 columns, then the temp table needs to have 100 columns.Tara KizerSQL Server MVP since 2007http://weblogs.sqlteam.com/tarad/ |
|
|
|
|
|