How to insert tab separated data from text file which has more than 1 million records into a SQL Server table using C#? -
i insert raw data file here in form of .txt
, tab separated data sql server table.
i perform operation of c# application, stumble upon how file has more 1 million records in it.
i appreciate , pointers on this.
e.g. have raw data file (tab separated) named myfile.txt
, create table in sql server database. file have values may have various form of datatypes, (e.g. has datetime part, integer value, nvarchar string etc.) , have create sql server table same columns , corresponding datatypes.
.txt
file below
2015-07-28 18:41:07 9f4768273621d04da45e732932278497 sam 2015-07-27 18:41:07 9f4768273621d04da45e732932278497 ricky 2015-07-26 18:41:07 9f4768273621d04da45e732932278497 roxy
table structure formed should appear below:
date time userid username 2015-07-28 18:41:07 9f4768273621d04da45e732932278497 sam 2015-07-27 18:41:07 9f4768273621d04da45e732932278497 ricky 2015-07-26 18:41:07 9f4768273621d04da45e732932278497 roxy
where:
date
,time
column ofdatetime
datatypeuserid
ofnvarchar(100)
usename
nvarchar(50)
Comments
Post a Comment