2
我應該在Access中創建一個數據庫,稍後將轉移到Oracle。對於每年我應該導入一個包含數百萬行數據的csv文件,可以追溯到1985年。我相信Access不能保存所有這些數據,所以我想我會有一個主數據庫引用其他數據庫。將csv文件導入到每個新數據庫中
我需要什麼代碼來創建每年的數據庫?
這是我到目前爲止有:
DocLocate = InputBox("Input Document Location") & "\"
StartYear = InputBox("Input Start Year")
EndYear = InputBox("Input End Year")
i = StartYear
strPath = DocLocate
strTable = strFile
strFile = "mar31_wts_" & i & ".csv"
Do Until i > EndYear
strPathFile = strPath & strFile
DoCmd.TransferText acImportDelim, acSpreadsheetTypeText, strFile, strPathFile, blnHasFieldNames
i = i + 1
strFile = "mar31_wts_" & i & ".csv"
Loop
什麼是迭代的最好方式,使每年創建一個新的數據庫。我做了:'直到我> EndYear' –
也在哪裏最好的地方把鏈接線? –
需要在數據導入後,最後可能是最好的,'app.Quit' – Leviathan