我很努力與MS Access 2010 SQL。任何人都可以看到爲什麼下面的SQL語句會在FROM子句中產生「語法錯誤?」SQL聯盟所有「語法Eror in從句子」
INSERT INTO Attendance
SELECT [AttendanceData].Student, [AttendanceData].[10/1/2015] AS AttendValue,
"10/1/15" AS AttendDate
FROM [AttendanceData]
UNION ALL
SELECT [AttendanceData].Student, [AttendanceData].[10/2/2015] AS AttendValue,
"10/2/15" As AttendDate
FROM [AttendanceData];
個人陳述做工精細,但與UNION ALL結合,我收到
語法錯誤在FROM子句「。
任何幫助,將不勝感激!
謝謝
什麼是'Attendance'表中的列? –
請參閱['FROM'與巨大的UNION子句有關的語法錯誤](http://stackoverflow.com/questions/17284174/from-syntax-error-involved-with-huge-union-clause) – Marusyk
並且使用適當的字符串表達式爲您的日期值:'#2015/10/2#作爲AttendDate' – Gustav