General information
Forum:
Microsoft SQL Server
>Hi All,
>
>I work with Visual Foxpro. I have to use Dynamic Where Clause in my SQL Server queries.
>
>I found two options on the threads :
>1) SELECT * FROM Table WHERE (SELECT CASE ...) = (SELECT CASE ...)
>2) DECLARE @SqlStatement varchar(4000)
> SET @SqlStatement = 'Sql Statement'
> EXEC (@SqlStatement)
>
>I'd like to know which option offer better performance.
>Or is there other options ?
>
>Thanks for your help.
They are not equal, but 2 is the best, sure.
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only