Hi All,
in my sproc I have a local variable @strSQL. I keep concatenating to this variable in my sproc and I wana use it in my "WHERE" clause at the end.
IF ...
SET @strSQL = @strSQL + ....
IF
.
.
.
@strSQL contains something like this : 'TBL.ID = 345'
BEGIN
SELECT ....
WHERE ---->> here I wana use what's in @strSQL
any ideas?
Thanks
Azita
in my sproc I have a local variable @strSQL. I keep concatenating to this variable in my sproc and I wana use it in my "WHERE" clause at the end.
IF ...
SET @strSQL = @strSQL + ....
IF
.
.
.
@strSQL contains something like this : 'TBL.ID = 345'
BEGIN
SELECT ....
WHERE ---->> here I wana use what's in @strSQL
any ideas?
Thanks
Azita