access資料庫里有2個表,表內有3個欄位是相同的,現在想同時查詢這兩個表,并將表內的其他欄位內容全部顯示出來,怎么做啊?我的代碼是:
Adodc1.RecordSource = "Select * From (select*from table1 join table2 on table1.r1=table2.r1 and table1.r2=table2.r2 and table1.r3=table2.r3) Where r1 = '" & Textqzl.Text & "' and r2 = '" & Textkd.Text & "' and r3 = '" & Textqsgd.Text & "'"
Adodc1.Refresh
運行時一直提示form字句語法錯誤,求教,不勝感激!
uj5u.com熱心網友回復:
先查下你是發帖時,把“from字句”錯敲成"form字句"了嗎.必須指出,你這SQL寫得很正規。粗看一下,第二個“select*from”部分中間無空格就顯然不對,至于后面沒有處理好'就更不用說了。
Adodc1.RecordSource = "Select * From (select*from table1 join table2 on table1.r1=table2.r1 and table1.r2=table2.r2 and table1.r3=table2.r3) Where r1 = '" & Textqzl.Text & "' and r2 = '" & Textkd.Text & "' and r3 = '" & Textqsgd.Text & "'"
轉載請註明出處,本文鏈接:https://www.uj5u.com/gongcheng/120576.html
上一篇:請教下,關于webbrowser中設定鏈接為焦點的方法
下一篇:資料采集卡程式解讀?
