开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜