打印本文 打印本文 关闭窗口 关闭窗口
T-SQL: 读取磁盘文件
作者:武汉SEO闵涛  文章来源:敏韬网  点击数1085  更新时间:2007/11/14 12:53:54  文章录入:mintao  责任编辑:mintao

数据倒入还是建议用 bcp

if exists (select * from tempdb..sysobjects where id = object_id(N''''tempdb..#T''''))
   drop table [#T]

Create table #T(id int identity(1,1) not null, remark varchar(8001) null)
Insert into #T
Exec master.dbo.xp_cmdshell ''''type e:\data.txt''''
select * from #T

剩下就靠你自己 根据"数据类型"  整理 "数据格式" 等了.....

打印本文 打印本文 关闭窗口 关闭窗口