Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

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,553 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Moving data to the cloud? Find out if you’re ready

Before moving to the cloud, it is important to carefully define your db needs, plan for the migration & understand prod. environment. This wp explains how to define what you need from a cloud provider, plan for the migration & what putting a cloud solution into practice entails.

Question has a verified solution.

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

This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
I have a large data set and a SSIS package. How can I load this file in multi threading?
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

715 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