September 27, 2005 at 11:45 am
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...
Thanks for helping...
September 27, 2005 at 11:48 am
Create a linked server that points to that file.
Then select * into NewTableName from LinkedServer.?.?.?
This is assuming that it is a one time deal.
You can also use DTS to do this sort of things.
September 27, 2005 at 12:20 pm
I done this however the the file is "|" , pipe delimited, how do i accomodate for this?
September 27, 2005 at 1:00 pm
I can't help you much there as I've never done it...
Can you consider using a dts package for this?
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply