Hi,
Say if you had a store procedure called p_SelectData
defined as follows...
CREATE procedure dbo.p_SelectData
@.WhereClause varchar(100) as
DECLARE @.SQLString varchar(255)
SET @.SQLString = 'Select * From MockTable ' + @.WhereClause
EXECUTE ( @.SQLString)
@.Where clause contains the search criteria i.e
@.Where = ' Where Surname = ''Jones''...
or
@.Where = Where Surname = ''Jones'' and Forename ''Paul''.
My question is can a proper execution path be formed.
N.B. No I didn't implement this it was there when I got
there.
Thanks.
By "proper", do you mean an optimal exuection plan?
Vikram Jayaram
Microsoft, SQL Server
This posting is provided "AS IS" with no warranties, and confers no rights.
Subscribe to MSDN & use http://msdn.microsoft.com/newsgroups.
No comments:
Post a Comment