0
INSERT INTO ACHITARI (numar_document, cod_credit, data, suma_achitata)
SELECT Max(ACHITARI.[numar_document]) + 1 AS numar_document,
100 AS cod_credit, Date() AS data,
CREDITE.[valoare_credit]/CREDITE.[durata_in_luni] AS suma_achitata
FROM ACHITARI, CREDITE
WHERE CREDITE.cod_credit = 100;
你好,我試圖運行上面的查詢。我必須使用來自2個不同表格的數據在ACHITARI表中插入一個新行。我正在收到an errorMicrosoft Access INSERT INTO聲明
在問這個問題之前,我已經搜索了很多,我發現它與Max
函數有關...關於組函數的一些事情,但我真的不明白。我希望你們能幫助我。提前致謝!
** Thumb的規則:**當你在'Select'中有'聚合'功能時,'非聚合'列應該出現在'Group by'中 –