sql mass insert. Need help
Hi I doing a mass insert of records from this text file using the script below. I having a problem here to set the "c:\" to a parameter I pass in from a vb .net application? I do not want to define a fixed path for that. IS that possible?
INSERT开发者_如何学Go INTO tblContacts
SELECT *
FROM [Text;Database=C:\;HDR=Yes].[Import.csv]
The best way would be to use any scripting language (or maybe VBA) to parse the SQL file, change the path, write it again, then batch-run the changed SQL file.
Write the path as %TEMP%\Import.csv
. This is a special shortcut to get to the temp folder. You will have access to write to the user's temp folder.
精彩评论