Fork me on GitHub

SQL Server 读取CSV中的数据

测试:

Script:

create table #Test
(
    Name nvarchar(10),
    Age int,
    T nvarchar(10)
)

BULK INSERT #Test
From 'I:\AAA.csv'
with(
    fieldterminator = ',',
    rowterminator = '\n'
)

select * from #Test

drop table #Test

Result:

Name Age T
TestA 13 Aug
TestB 14 App
TestC 15 Jus

posted @ 2015-03-30 21:40  种花生的读书人  阅读(862)  评论(0编辑  收藏  举报

该博客仅作为记录笔记,转载随意