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