May 22, 2011 at 12:08 pm
Hi,
i have a stored procedure which has many parameters. 2 of its parameters values come from 2 columns in a view.
stored proc parameters
@USAANR int
@claimopendate datetime
view columns
USAANR
claimopendate
i need to execute this procedure and before that take the parameters value from the columns of the view.
i need to take all the rows of both the columns (there is no where condition)
after this i need to load the results of the proc in a sql table.....
please provide some solution...
Thanks....
May 22, 2011 at 12:46 pm
Can you rephrase that?;-)
For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
May 22, 2011 at 2:33 pm
It can be easily done but the performance will be poor. Your best option is to rework the stored procedure (or an alternative version of it, retaining the original) so that it reads from the view, rather than working with a row at a time using parameters.
For better assistance in answering your questions, please read this[/url].
Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply