On the following query I keep getting the error 'The data types varchar and date are incompatible in the add operator'. As you can see I have tried to convert the date but doesn't seem to work. The variable @Date1
will start off as a date. Any suggestions?
declare @Date1 date
declare @SQL1 varchar(2000)
set @Date1 = convert(varchar, cast(getdate() as date), 102)
set @SQL1 = 'select * from tbl_1 where convert(varchar,cast(tbl_1.Current_dt as date),102) =
View Complete Post