27,579
社区成员
发帖
与我相关
我的任务
分享
新添加的ID,每天增加一个,每天的话是100条记录,均为同一个值,第二天新增,查询少于1的看是否导出来,如果没有导出来,那么进行导出
--1.
select id,title,urls into temptb from tb
--2
exec master..xp_cmdshell 'bcp "库名..表名" out "d:\tt.txt" -c -t ,-U sa -P password'
--3.
drop table temptb
-----------------------------
sp_configure 'show advanced options', 1
GO
RECONFIGURE
GO
sp_configure 'xp_cmdshell', 1
GO
RECONFIGURE
GO
------------------------------