Solved

SQL Server DTS issue with .txt file

Posted on 2015-02-11
2
57 Views
Last Modified: 2016-02-16
Hi,
I have been trying to import/create a new table from a .txt flate file tab delimited, nothing complicated, excepted that by default the string length that the DTS package set for the txt field id varchar (50).
I increased the field length in the mapping window to Nvarchar(max) for fields longer than 50 characters, set the global error to ingnore for each data fields on for the whole file, but the import or create table failed because of the Field Trucation error!
Is this a bug in DTS? How to solve this matter, I spent a great deal of time on it and can't find the solution. I need help.
0
Comment
Question by:pascalmartin
2 Comments
 
LVL 18

Accepted Solution

by:
Simon earned 500 total points
ID: 40605508
Are you using legacy DTS? Have you tried using the Import Data Wizard to bring it in via SSIS instead?
Are you using SQL Server 2008 (as the topic area of your question implies)?
0
 

Author Comment

by:pascalmartin
ID: 40611164
Hi,
As suggested I have tried with SSIS (new to me) and it works. Thanks!
0

Featured Post

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

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.
JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

910 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

28 Experts available now in Live!

Get 1:1 Help Now