문제

I am trying to come up with a query using SQL Server CE. I have a column Qty and I want to subtract from the column as the user enters an amount. Here is what I have:

UPDATE ItemInventoryControl
SET Stocks = SUM(Stocks - @Stocks)
WHERE (ItemName = @ItemName)

But is not working, I get an error:

SQL Execution Error

Error Source: SQL Server Compact ADO.NET Data Provider
Error Message: Not Implemented

도움이 되었습니까?

해결책

I figured out my mistake, it should be:

UPDATE       ItemInventoryControl
SET          Stocks = Stocks - @Stocks
WHERE        (ItemName = @ItemName)
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top