Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2008-10-31
2
Medium Priority
?
1,574 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 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 2000 total points
ID: 22854380
no, at least not that I know. I might be wrong, though, and learning something new!
0

Featured Post

NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Recently we ran in to an issue while running some SQL jobs where we were trying to process the cubes.  We got an error saying failure stating 'NT SERVICE\SQLSERVERAGENT does not have access to Analysis Services. So this is a way to automate that wit…
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
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.

916 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