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
 General SQL Server Forums
 New to SQL Server Programming
 loading data into sql table

Author  Topic 

ajayjain31@yahoo.com
Starting Member

1 Post

Posted - 2008-04-25 : 02:18:08
I want to read file from c:\abc.txt through sql programming and Insert this file data into table.

suppose c:\abc.txt has following data
aman 10 50,000
sumesh 20 40,000

suppose I have created table abc( a varchar(30), b int, c int)
How I will do it

Thanks
Ajay



visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-04-25 : 02:28:30
Different approaches can be used
1. DTS/SSIS Export import
2.bcp
3.BULK INSERT

Have a look at this:-
http://msdn2.microsoft.com/en-us/library/ms175937.aspx
http://www.zdnetasia.com/techguide/database-management/0,3800010795,62039740,00.htm
Go to Top of Page

jen
Master Smack Fu Yak Hacker

4110 Posts

Posted - 2008-04-28 : 05:06:30
Nigel has a very nice page for bcp references and loads of goodies...

www.mindsdoor.net

--------------------
keeping it simple...
Go to Top of Page

soorajtnpki
Posting Yak Master

231 Posts

Posted - 2008-04-28 : 07:21:21
hi
use below link
http://www.sqlteam.com/article/using-bulk-insert-to-load-a-text-file

will help u......
ok tanx
Go to Top of Page
   

- Advertisement -