0
我有一個查詢,我手動更改日期爲我喜歡。我該如何動態調整當前月份到日期的數據?如何在MSSQL中獲取月份日期數據?
SELECT SUM(op.price * op.qty)
FROM dbo.Orders o
INNER JOIN dbo.OrdersProduct op ON op.orderID = o.orderID
WHERE o.ID IN (xx, xx, xx, xx)
AND o.orderDate BETWEEN '3/1/2016' AND '3/10/16'
[TSQL檢索當前月/年的所有記錄(http://stackoverflow.com/questions/13727800/tsql-retrieve-all-記錄式電流 - 月 - 年) – lad2025