Monday, February 27, 2012

help me! read text file in sql

HELLO,

please help me, how to read txt file and then insert it to sql table.

i have file like this name.txe

<...
012301231923123902132003
23423i4u23490342342342343
...>
I have 4 column and want to fractionise this text '012301231923123902132003'
and put in to table.

Best regards

RobertHi

If you want to use DTS see the following tutorial
http://www.sqldts.com/default.aspx?6,107,276,7,1

John
"Robert K" <rkloma@.hotmail.com> wrote in message
news:bhap7a$c3n$1@.news.onet.pl...
> HELLO,
> please help me, how to read txt file and then insert it to sql table.
> i have file like this name.txe
> <...
> 012301231923123902132003
> 23423i4u23490342342342343
> ...>
> I have 4 column and want to fractionise this text
'012301231923123902132003'
> and put in to table.
>
> Best regards
> Robert|||See response in microsoft.public.sqlserver.programming

--
- Anith
( Please reply to newsgroups only )|||Hi,

You can use the xp_cmdshell to read the contents of a text file.
You can look at the sample at
http://www.kodyaz.com/articles/read...p_cmdshell.aspx

Eralper
http://www.kodyaz.com

No comments:

Post a Comment