该查询基本上从当前日期开始检索6-8天之间的数据。在测量数据的年龄时,我想不包括周末。DATEADD(day, -6, GETDATE()) AND CreatedDate >= DATEADD(day, -8, GETDATE()) -- here I get data between 6-8 days old
AND ((DATEPART(dw, CreatedDate) + @@DATEFIRST) % 7) NOT IN (0, 1) -- Here im trying to exclude
我正在使用Oracle示例:2) 1,2,3,5,11第一个例子是我遇到的问题。我正在编写一个select查询,如: SELECT * from Table where Value IN (1,2,3,6-8,9-11)SELECT * from Table where Value IN (1,2,3,6,7,8,9,10,1