i am getting an error when trying to concatenate date and string.
declare @select varchar(max)
declare @where varchar(max)
set @select = 'select * from tbl Emp........'
@where = ' where Emp.date >='+ cast((cast(getdate() as date)) as varchar(20))
exec(@select+@where)
I also tried to do like below but didn't work:
declare @today varchar(20)
@today = cast((cast(getdate() as date))
@where = 'where Emp.date> =' + '@today'