我收到以下错误:
System.Data.OleDb.OleDbException(0x80040E14):未定义的功能' STR_TO_DATE'在表达中。
当我运行此查询时
PYTHONPATH=/opt/graphite/webapp django-admin.py migrate --noinput --settings=graphite.settings --run-syncdb
答案 0 :(得分:0)
尝试使用Access SQL:
"SELECT
ProductCode,
Description,
SUM(Quantity) as Quantity,
DateValue(DateIn) as DateIn
FROM
Product as P,
StockIn as S
WHERE
S.ProductNo = P.ProductNo
AND
DateValue(DateIn) BETWEEN #" + StartDate.ToString("yyyy-MM-dd") + "# AND #" + EndDate.ToString("yyyy-MM-dd") + "# GROUP BY P.ProductNo, DateValue(DateIn) ORDER BY DateValue(DateIn), Description";