IT Solutions
Search This Blog
Tuesday, January 18, 2011
How to import data from txt file to sql table
create table #tmp (val1 int, val2 int, val3 int)
BULK
INSERT #tmp
FROM '\\192.168.2.25\c$\test.txt'
WITH
(
FIELDTERMINATOR = ',',
ROWTERMINATOR = '\n'
)
select * from #tmp
Newer Posts
Older Posts
Home
Subscribe to:
Posts (Atom)