Home All Groups Group Topic Archive Search About

OPENROWSET MSDASQL Microsoft Text Driver

Author
28 Jul 2005 11:01 AM
Subramaniam Sivakumar
My query is like follows

SELECT * INTO TABLE_1
FROM OPENROWSET ('MSDASQL', 'Driver={Microsoft Text Driver (*.txt; *.csv)};
  DefaultDir=D:\;','select * from FILE_1.txt ')

It is working fine with the files having ','  as separator.

I want to use other characters ('*' ';') as separator. Because the source
file is very large it is not possible to replace the existing separator with
','


Regards
Sivakumar

Author
28 Jul 2005 12:00 PM
Guillaume Greffe
For such complicated requirements I would use DTS, see the following
article:
http://www.mssql.com.au/kb/html/gmgxsl.dll/htmlkb?usexsl=y&sp=psearch_article_text&@sa_id=56

P.S.:
you can use DMO within an SQL script to execute a DTS package.


Show quote
"Subramaniam Sivakumar" <SubramaniamSivaku***@discussions.microsoft.com>
wrote in message news:F3AD404C-0BA4-4EE6-BC0F-29FF834A87EF@microsoft.com...
> My query is like follows
>
> SELECT * INTO TABLE_1
> FROM OPENROWSET ('MSDASQL', 'Driver={Microsoft Text Driver (*.txt;
*.csv)};
>   DefaultDir=D:\;','select * from FILE_1.txt ')
>
> It is working fine with the files having ','  as separator.
>
> I want to use other characters ('*' ';') as separator. Because the source
> file is very large it is not possible to replace the existing separator
with
> ','
>
>
> Regards
> Sivakumar
>
Author
28 Jul 2005 12:29 PM
ML
You might also want to read this: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odbc/htm/odbcjetschema_ini_file.asp


ML

AddThis Social Bookmark Button