当“?”不能用作Excel中电子表格的参数引用时,使用的正确SQL命令是什么?
当我将硬编码日期(突出显示)更改为 ? 它返回了转换错误消息。修复是什么?感谢我能得到的所有帮助。 SET NOCOUNT ON DECLARE @lastdayofweek DATETIME DECLARE @firstdayofweek DATETIME DECLARE @previouslastdayweek DATETIME DECLARE @previousfirstdayweek DATETIME SET @lastdayofweek = '2018-08-03' SET @firstdayofweek = dateadd(day, - 6, @lastdayofweek) SET @previouslastdayweek = dateadd(day, - 1, @firstdayofweek) SET @previousfirstdayweek = dateadd(day, - 6, @previouslastdayweek) SELECT DISTINCT b.unittype ,b.propertyid ,d.propertyname1 ,count(CASE WHEN …