2

我编写了一个存储过程,它使用批量插入从 *.csv 文件加载数据。当我提到物理路径时它工作正常。现在我想在 SQL Server 项目中使用相同的存储过程。因此我必须提到相对路径。无论如何我可以这样做吗?提前致谢。

4

1 回答 1

1

Your best bet would be to either pass the root in as a parameter to the SP, or have a config table in your DB and set the root path there. Heck, you might as well just pass in the entire fully qualified name of the file if you can.

于 2013-06-05T12:16:01.697 回答