且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

BCP将所有文件从文件夹导入数据库

更新时间:2022-12-08 13:33:22

简单的BCP命令仅导入单个文件. 为了达到上述目的,我们需要在命令中使用循环.

simple BCP command import only single file. To achieve the above we need to use looping with the command.

我已经使用以下命令简单命令.

I have used the following command simple command.

for /r %i in (*) do bcp <tablename> in  %i -t "^" -r "\n" -c -C 28591 -S <databaseinstance>  -U <username> -P <password>

有效.