?
Solved

Flat File Loading Using SSIS

Posted on 2009-04-02
4
Medium Priority
?
638 Views
Last Modified: 2013-11-10
Hi,
I am unable to load the flat file to a table using SSIS.
can any one check the package.I enclosed ssis package, sql for creating  destination table,
file to load.
Let me know if you have any questions.
Thanks and Regards,
Coventri
flat-file.TXT
Package3.txt
create-table-sql-.txt
0
Comment
Question by:coventri
[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
  • 3
4 Comments
 
LVL 30

Expert Comment

by:nmcdermaid
ID: 24056912
Do you get an error message or does it just not load any data?
0
 
LVL 30

Accepted Solution

by:
nmcdermaid earned 2000 total points
ID: 24057124
OK first thing I've noticed: You have the LABELER column set up as char(5) in the destinaion table, but in your file, the data is actually 7 characters - it is actually followed by two spaces.
You have a few options for fixing this but probably the most obvious one is to use a Derivied column transformation to trim the input down to five characters. You just need to be totally certain the input data will only ever be five characters.
An easier alternative is to extend the destination table column to 7 characters, but you really need to sort out your data types as early as possible so the derived column is the best solution.

DerivedColumn.jpg
DerivedColumnProperties.jpg
0
 
LVL 30

Expert Comment

by:nmcdermaid
ID: 24057131
You'll have to repeat this for all the columns, most likely - either extend the length in the destination table, or trim the string in a derived column transformation.
Also, is there any reason you are using a global temporary table? why not use a normal table? That is how this is normally done. It may save some complications down the track.
0
 
LVL 22

Expert Comment

by:PedroCGD
ID: 24058440
Which is the error?
Also follow nmcdermaid suggestions.
Regards,
Pedro
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL). Depending on business requirements, a single Stored Procedure can return differe…
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
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.
Via a live example, show how to shrink a transaction log file down to a reasonable size.
Suggested Courses

752 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