任何人都可以引導我在正確的方向嗎?我試過儘可能地編輯我的語法,並搜索了2個小時如何完成這項工作。但我無法讓我的CAST功能正常工作。我究竟做錯了什麼?SQL Cast函數語法錯誤
SELECT dbo_orders.ordernumber,
dbo_orders.orderdate,
Sum([dbo_Order Details].priceperunit) AS sumofpriceperunit,
dbo_orders.producttotal,
Sum([dbo_Order Details].costperunit) AS sumofcostperunit,
dbo_orders.shippingtotal,
dbo_tracking.cost,
[dbo_Order Details].dropship,
dbo_orders.cartid
CAST ([dbo_Tracking].cost) AS number
FROM dbo_tracking
INNER JOIN ([dbo_Order Details]
INNER JOIN dbo_orders
ON [dbo_Order Details].ordernumber = dbo_orders.ordernumber)
ON dbo_tracking.numerickey = [dbo_Order Details].ordernumber
GROUP BY dbo_orders.ordernumber,
dbo_orders.orderdate,
dbo_orders.producttotal,
dbo_orders.shippingtotal,
dbo_tracking.cost,
[dbo_Order Details].dropship,
dbo_orders.cartid
HAVING (((
dbo_orders.orderdate)>=(#6/1/2016#)
AND (
dbo_orders.orderdate)<=(#6/30/2016#)));
感謝您的幫助。由於某些原因,它仍然給我語法錯誤(缺少運算符)。 – DRK
刪除有並且在一組之前查找一個where子句並且統計你的括號 – maSTAShuFu