Solved

How do I change the delimiter used by OPENROWSET when reading a text file?

Posted on 2008-10-31
2
1,442 Views
Last Modified: 2012-08-13
Hi folks,

I am using OPENROWSET to read a delimited text file created by another application. Here's the command I'm using:

  SELECT *
  FROM OPENROWSET(
    'MSDASQL',
    'Driver={Microsoft Text Driver (*.txt; *.csv)};DefaultDir=E:\MPS_REPT_DATA;',
    'SELECT TOP 100 PERCENT * FROM E:\MPS_REPT_DATA\test1.txt')

My question is this: is it possible to change the delimiter used to separate columns?

Thanks,

Jim
0
Comment
Question by:jrollins138
2 Comments
 
LVL 142

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 500 total points
Comment Utility
no, at least not that I know. I might be wrong, though, and learning something new!
0
 
LVL 15

Expert Comment

by:MohammedU
Comment Utility
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

I wrote this interesting script that really help me find jobs or procedures when working in a huge environment. I could I have written it as a Procedure but then I would have to have it on each machine or have a link to a server-related search that …
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now