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 2000 Forums
 Import/Export (DTS) and Replication (2000)
 Inserting a Text file into a table generated from the file

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2005-09-28 : 07:59:49
Stephen writes "i load leads for a telecommunications company, a problem i'm having is the client will send a txt file with the columnnames at the top of the leads received along with data.

what i'm wanting to know is if there is a way ONLY USING TSQL to insert from that txt file and create the table at the same time?

ie...

"Name|address|phone|age

Joe|123 drive|9365551234|20

TIM|321 drive|9365555555|20"

If above was a text file i would want a table created called "Leads" have the 4 columns and the data...

i have tried useing Linked server but i cant seem to find away to have a delimiter, since the files have a Pipe delimiter...

Thanks for helping..."
   

- Advertisement -