?
Solved

IMPORTING CSV FILE USING BCP OR BULK INSERT

Posted on 2005-03-11
4
Medium Priority
?
240 Views
Last Modified: 2008-03-04
I have been trying to successfully import a | delimited file into a SQL database with no success.  I continue receiving an error message about non-whitespace characters.

I read about using DTS to strip out the non-white characters by using the TRIM function.  I am not a programmer - learning, however - and am asking for assistance in completing a DTS package that will strip out all of the non-whitespace characters so I can successfully conduct an import from this file.

I am not sure what information to provide so please let me know what you will need to provide a solution.

Thanks!

Saladart
0
Comment
Question by:saladart
  • 2
4 Comments
 
LVL 25

Expert Comment

by:jrb1
ID: 13519851
Can you give the syntax of how you are importing?  You should be specifying a Column Delimiter.
0
 
LVL 25

Accepted Solution

by:
jrb1 earned 2000 total points
ID: 13519872
Also, an example of a row of data would be helpful.

Are you going through Enterprise Manager? Then through the "Import Data" dialog?  You specify your file name (source text file).  Then delimited with the |.
0
 

Author Comment

by:saladart
ID: 13521015
I figured it out - so you know, I was using DTS do to the import through.  The problem was I had selected the wrong row delimiter.

Thanks for your input!

Saladart


0
 
LVL 34

Expert Comment

by:arbert
ID: 13522607
Close the question
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

What if you have to shut down the entire Citrix infrastructure for hardware maintenance, software upgrades or "the unknown"? I developed this plan for "the unknown" and hope that it helps you as well. This article explains how to properly shut down …
It is possible to export the data of a SQL Table in SSMS and generate INSERT statements. It's neatly tucked away in the generate scripts option of a database.
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.
Suggested Courses

864 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