我正在尝试获取前几个月的数据,
我尝试了一些我通常用于每周报告的代码,但是我似乎无法正常工作,如果有人可以提供帮助,我将不胜感激
Set @StartDate = (Select C.FirstDateOfMonth From [iCS.Warehouse3].lk.CalendarNew
Set @EndDate = (Select C.LastDateOfMonth From [iCS.Warehouse3].lk.CalendarNew
不正确的语法错误
答案 0 :(得分:0)
您有语法错误,因为您没有关闭括号:
Set @StartDate = (Select C.FirstDateOfMonth From [iCS.Warehouse3].lk.CalendarNew --need a close paren here