[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 648
  • Last Modified:

Flat File Loading Using SSIS

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
coventri
Asked:
coventri
  • 3
1 Solution
 
nmcdermaidCommented:
Do you get an error message or does it just not load any data?
0
 
nmcdermaidCommented:
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
 
nmcdermaidCommented:
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
 
PedroCGDCommented:
Which is the error?
Also follow nmcdermaid suggestions.
Regards,
Pedro
0

Featured Post

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now