Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SSIS and Import/Export (2005)
 upload text file to a table

Author  Topic 

cognos79
Posting Yak Master

241 Posts

Posted - 2007-11-01 : 10:13:20
I do have a comma separated text file.
"firstname","lastname","ssn","dob"
"firstname1","lastname1","ssn1","dob1"

The text file can have 50000 records. What is the best way to upload the file into a table. The table structure looks like:

Table1:
Fname varchar(50)
lname varchar(50)
ssn varchar(50)
dob varchar(50)

Any thoughts???

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2007-11-01 : 10:19:14
1 Import data wizard from Management studio
2 BULK INSERT

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

cognos79
Posting Yak Master

241 Posts

Posted - 2007-11-01 : 10:25:57
I dont think I can use import wizard bc I want to schedule this process a job and make it run overnight.
Go to Top of Page

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2007-11-01 : 22:58:33
Use ssis package, you can run the package in schedule.
Go to Top of Page

cognos79
Posting Yak Master

241 Posts

Posted - 2007-11-02 : 13:51:04
Thanks
Go to Top of Page
   

- Advertisement -