[英]Ms-access Syntax error (missing operator) in query expression '(Quantity * UnitPrice) ExtendedPrice'
OleDbConn.ole = "SELECT ProductCode, Description, Quantity, UnitPrice, (Quantity * UnitPrice) ExtendedPrice FROM SalesReturnItem sri INNER JOIN Product p ON p.ProductNo = sri.ProductID WHERE Sri.InvoiceNo = "
+ invoiceNo + " ORDER BY Description ";
Whenever i excute this query i get the following error- 每当我执行此查询时,我都会收到以下错误-
Syntax error (missing operator) in query expression '(Quantity * UnitPrice) ExtendedPrice'.
查询表达式“(Quantity * UnitPrice)ExtendedPrice”中的语法错误(缺少运算符)。
please help 请帮忙
Use AS - SQL aliases are used to give a table, or a column in a table, a temporary name. 使用AS-SQL别名用于为表或表中的列提供临时名称。
OleDbConn.ole = "SELECT ProductCode, Description, Quantity, UnitPrice, (Quantity * UnitPrice) AS ExtendedPrice FROM SalesReturnItem sri INNER JOIN Product p ON p.ProductNo = sri.ProductID WHERE Sri.InvoiceNo = "
+ invoiceNo + " ORDER BY Description ";
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.