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
 Insert data from a text file into the table

Author  Topic 

zamaan
Starting Member

19 Posts

Posted - 2006-04-15 : 23:17:22
Hi. my websever mysql manager allows to Insert data from a text file into the table.
currently i have a table with the following fields.

email name country

so i wanto insers data from a text file into this table.
so my question is : how the text file format should be prepared.

i.e. the first record would be > xxxx@yahoo.com john us



nr
SQLTeam MVY

12543 Posts

Posted - 2006-04-16 : 08:55:28
I would go for
"xxxx@yahoo.com","john","us"

Not so important for the email address but the name needs delimitters.
The other option would be fixed width.
Both make it easy to bulk insert.

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

zamaan
Starting Member

19 Posts

Posted - 2006-04-16 : 11:45:33
Hi nr.

thanks for the post.
ok. it is clear now!

regards
afridy

Go to Top of Page
   

- Advertisement -