SELECT
dTotalCharge,
iCarrierInvoiceDetailsID,
dtPickupDate,
vcTrackingNum,
SUM(dTotalCharge) OVER (PARTITION BY iCarrierInvoiceDetailsID
ORDER BY dtPickupDate, vcTrackingNum
ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS runningTotal
FROM tblCID
Getting error:
Msg 102, Level 15, State 1, Line 6
Incorrect syntax near 'ROWS'.
Any idea what is wrong with this. I had another problem before PIVOT
before. These are examples out of 70-461
Training Kit. I am confused.