![](/img/trans.png)
[英]Adding a new column to an existing table in an access ODBC database from R
[英]Importing only several fields from an ODBC database table into an access table
這適用於將整個表從ODBC數據庫導入Access:
DoCmd.TransferDatabase acImport, "ODBC Database", "ODBC;DSN=SuperBase", acTable, "BDONAMES", "BDONAMES", False
但是ODBC數據庫中有一個包含517個字段的表,我只想導入5或6列/字段。 使用VBA執行此操作的最佳方法是什么? 我用谷歌搜索了幾天,並在stackoverflow上讀了10或15個線程,但我還沒有看到這個具體的問題得到解答。 提前致謝
嘗試一下以下內容:
sSQL="SELECT This,That,TheOther,Columns INTO BDONames " _
& "FROM [ODBC;DSN=SuperBase].BDONAMES"
CurrentDB.Execute sSQL
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.