标签:dir rom char test size pre 指定 cmdshell creat
--方法1: EXEC xp_dirtree ‘\\172.6.6.6\D$\TEXT\‘,1,1 --方法2: CREATE TABLE #TXT_Name (NAME VARCHAR( 2000)) SET @iSQL=‘DIR \\172.6.6.6\D$\TEXT\ /ON/B >D:\TEST.TXT‘ EXEC master..xp_cmdshell @iSQL,no_output BULK INSERT #TXT_Name FROM ‘D:\TEST.TXT‘ WITH (BATCHSIZE =1000,FIELDTERMINATOR =‘\t‘,FIRSTROW =1,ROWTERMINATOR =‘\n‘,TABLOCK )
标签:dir rom char test size pre 指定 cmdshell creat
原文地址:http://www.cnblogs.com/blossomwei/p/6923065.html