Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
SQL Server 2005
»
SQL Server 2005 Integration Services
»
Invalid character value for cast...
Invalid character value for cast specification
Rate Topic
Display Mode
Topic Options
Author
Message
rockstar283
rockstar283
Posted Tuesday, March 05, 2013 4:50 PM
SSC Journeyman
Group: General Forum Members
Last Login: Monday, May 20, 2013 12:30 PM
Points: 84,
Visits: 385
I have a txt file with data as below:
col1,col2,col3
NY,14319,9900
MA,14241,9900
CA,14358,Get WO NE
To load this file, I am using a flat file source and I have declared the data type of all three columns as Unicode String with 500 length in the advance editor..But when I run this package, I am getting an error at the third line:
Invalid character value for cast specification
I get this error at the source adapter only..Can someone please help me out here..
P.S. Not giving a table structure as this a txt file
I am using SSIS 2008
Post #1427081
Lynn Pettis
Lynn Pettis
Posted Tuesday, March 05, 2013 4:56 PM
SSC-Insane
Group: General Forum Members
Last Login: Today @ 10:17 AM
Points: 21,626,
Visits: 27,473
A guess, SSIS is expecting the third column to be an integer and the text data it found can't be converted.
Lynn Pettis
For better assistance in answering your questions, click here
For tips to get better help with Performance Problems, click here
For Running Totals and its variations, click here
or
when working with partitioned tables
For more about Tally Tables, click here
For more about Cross Tabs and Pivots, click here
and
here
Managing Transaction Logs
SQL Musings from the Desert
Fountain Valley SQL
(My Mirror Blog)
Post #1427083
rockstar283
rockstar283
Posted Tuesday, March 05, 2013 5:05 PM
SSC Journeyman
Group: General Forum Members
Last Login: Monday, May 20, 2013 12:30 PM
Points: 84,
Visits: 385
Thanks for the reply mate..
but I have already mentioned the data type of the columns as Unicode String with 500 length..in the connection manager and in the source adapter as well
Post #1427086
Lynn Pettis
Lynn Pettis
Posted Tuesday, March 05, 2013 6:22 PM
SSC-Insane
Group: General Forum Members
Last Login: Today @ 10:17 AM
Points: 21,626,
Visits: 27,473
Okay, I gave it my shot in the dark. Unfortunately we can't see what you see so unless you provide us with more information that's about all you will get.
The force may be strong, but it isn't that strong.
Lynn Pettis
For better assistance in answering your questions, click here
For tips to get better help with Performance Problems, click here
For Running Totals and its variations, click here
or
when working with partitioned tables
For more about Tally Tables, click here
For more about Cross Tabs and Pivots, click here
and
here
Managing Transaction Logs
SQL Musings from the Desert
Fountain Valley SQL
(My Mirror Blog)
Post #1427107
Phil Parkin
Phil Parkin
Posted Wednesday, March 06, 2013 7:23 AM
SSCarpal Tunnel
Group: General Forum Members
Last Login: Today @ 9:39 AM
Points: 4,247,
Visits: 9,500
What's on row 4?
If you remove that row, does the rest of the file process OK? If not, what else fails?
____________________________________________________________________________________________
Help us to help you. For better, quicker and more focused answers to your questions, consider following the advice in this link:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
If you are asking for help and your post does not contain a question, you should expect responses which do not contain any answers. Put a question mark in there somewhere - it's not rocket science.
Post #1427383
rockstar283
rockstar283
Posted Wednesday, March 06, 2013 8:49 AM
SSC Journeyman
Group: General Forum Members
Last Login: Monday, May 20, 2013 12:30 PM
Points: 84,
Visits: 385
Row 4 is again like below:
CA,93455,9435
I am not able to process the file after row#3 where it is failing in the data flow task..even redirecting the erranous rows fails as the source adapter is struggling to cast the value in the third row
Post #1427465
Lynn Pettis
Lynn Pettis
Posted Wednesday, March 06, 2013 9:27 AM
SSC-Insane
Group: General Forum Members
Last Login: Today @ 10:17 AM
Points: 21,626,
Visits: 27,473
Can you provide the complete and uneditted error message?
Lynn Pettis
For better assistance in answering your questions, click here
For tips to get better help with Performance Problems, click here
For Running Totals and its variations, click here
or
when working with partitioned tables
For more about Tally Tables, click here
For more about Cross Tabs and Pivots, click here
and
here
Managing Transaction Logs
SQL Musings from the Desert
Fountain Valley SQL
(My Mirror Blog)
Post #1427489
« Prev Topic
|
Next Topic »
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.