mssql server 存储过程里,bulk insert table from '路径
动态语句, bulk insert的from 子句只能使用常量.
CREATE proc test
@fn varchar(50)
as
declare @path varchar(100)
set @path= 'd:\'
exec('
bulk INSERT table FROM '''+@path+@fn+'''
WITH
&nb【文章原创作者:高防服务器ip】sp; (
FIELDTERMINATOR = '','',
ROWTERMINATOR = ''\n''
)')
摘自CSDN
【来源:荆门网站推广 http://www.5h5q.com/jingmenseo/ 提供,感谢支持】
CREATE proc test
@fn varchar(50)
as
declare @path varchar(100)
set @path= 'd:\'
exec('
bulk INSERT table FROM '''+@path+@fn+'''
WITH
&nb【文章原创作者:高防服务器ip】sp; (
FIELDTERMINATOR = '','',
ROWTERMINATOR = ''\n''
)')
摘自CSDN
【来源:荆门网站推广 http://www.5h5q.com/jingmenseo/ 提供,感谢支持】