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
»
Data Type Conversion of Excel Source
Data Type Conversion of Excel Source
Rate Topic
Display Mode
Topic Options
Author
Message
rhythm.varshney
rhythm.varshney
Posted Monday, January 21, 2013 12:11 AM
SSC Journeyman
Group: General Forum Members
Last Login: Thursday, March 21, 2013 2:14 AM
Points: 77,
Visits: 184
I would like to import an excel sheet to a DB table which is having around 100 columns having data type varchar.
However as we know that by default excel source take unicode data type for these columns which ends in conversion error while importing to table.
Is there a way except advanced editor to change the data type of all columns of excel source in one shot instead of doing for every columns one by one manually fron advanced editor.
Post #1409368
Koen Verbeeck
Koen Verbeeck
Posted Monday, January 21, 2013 2:31 AM
SSCrazy Eights
Group: General Forum Members
Last Login: Today @ 2:14 PM
Points: 9,370,
Visits: 6,468
It might be easier to change the datatypes in the destination table.
You can also use the data conversion component. It's still manual, but at least you have a checkbox to select all the columns. 100 columns would take me 2 or 3 minutes.
Or you could write the data to a staging table having all unicode columns, and then transfer the data to the final destination table.
How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?
Member of
LinkedIn
. My blog at
LessThanDot
.
MCSA SQL Server 2012 - MCSE Business Intelligence
Post #1409435
mmartin1
mmartin1
Posted Wednesday, March 27, 2013 11:21 AM
SSC-Enthusiastic
Group: General Forum Members
Last Login: Friday, May 17, 2013 4:43 PM
Points: 192,
Visits: 640
Is there a way except advanced editor to change the data type of all columns of excel source in one shot instead of doing for every columns one by one manually fron advanced editor.
You mention advanced editor. Are you using a flat file connection to point to the Excel file? I am wondering if this is actually a csv file that you opened with Excel. If so in the advanced editor you can select all the columns at once by using shift and the down arrow. then in the right pane change the data type to dt_str and it does it for all. If it is in Excel then I don't know any other way aside from the data conversion transformation.
Post #1436059
« 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.