7
Answers

In Query use variable like Dynamic SQL

Jitendra Patel

Jitendra Patel

12y
3.9k
1
Hi All,

I have 1 query in sql server.

DECLARE @sqlWhere VARCHAR(MAX)
SET @sqlWhere = 'flg_active = 1 order by CreatedDate'

Select * from TableName1 where @sqlWhere

Is it possible with out dynamic SQL.



Thanks,
Jitendra Patel


Answers (7)