可以直接在SQL SERVER 查询器里执行下面这条语句
EXEC master..xp_cmdshell 'bcp "gxsj.dbo.zjgxx" in "d:/d.txt" -c -S localhost -U sa -P password'
注意数据库表名前要加数据库名 -S -U -P要大写。
可以直接在SQL SERVER 查询器里执行下面这条语句
EXEC master..xp_cmdshell 'bcp "gxsj.dbo.zjgxx" in "d:/d.txt" -c -S localhost -U sa -P password'
注意数据库表名前要加数据库名 -S -U -P要大写。