SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Excel import - force column to be string (SSIS 2005)


Excel import - force column to be string (SSIS 2005)

Author
Message
whereisSQL?
whereisSQL?
SSCrazy
SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)

Group: General Forum Members
Points: 2062 Visits: 1481
I found some code to open excel and read contents. I am thinking of testing it out.

Hoping to use a script task to open excel, modify it by sorting by character count on the "255 problem column", and close excel. Then use Excel source.. and it should not truncate, or at least that's the plan.

If you guys have any luck please update.
Rob Taylor
Rob Taylor
Hall of Fame
Hall of Fame (3.9K reputation)Hall of Fame (3.9K reputation)Hall of Fame (3.9K reputation)Hall of Fame (3.9K reputation)Hall of Fame (3.9K reputation)Hall of Fame (3.9K reputation)Hall of Fame (3.9K reputation)Hall of Fame (3.9K reputation)

Group: General Forum Members
Points: 3928 Visits: 1616
Donny Z (8/21/2013)

I know what QUOTENAME's function is.
What I mean is how Jeff apply it in the excel source, cause AFAIK we can't use every T-SQL function when we try to select from excel, and we can't define text-qualifier unless we're using Flat File Source Ermm

So I thought maybe Jeff got something up his sleeve or know something I don't.
And basically I asked the same question suslikovich asked before my post.

Sorry, I misunderstood where the unknown was.

Throwing together a Q&D test SSIS package, I see that the Jet engine squawks if you try to use the QUOTENAME() function in a SELECT against the Excel data source.

Rob
raghavender.2369
raghavender.2369
SSC-Enthusiastic
SSC-Enthusiastic (183 reputation)SSC-Enthusiastic (183 reputation)SSC-Enthusiastic (183 reputation)SSC-Enthusiastic (183 reputation)SSC-Enthusiastic (183 reputation)SSC-Enthusiastic (183 reputation)SSC-Enthusiastic (183 reputation)SSC-Enthusiastic (183 reputation)

Group: General Forum Members
Points: 183 Visits: 391
Hi,

Did you get the solution ??? @50th row I have string... the destination data type is varchar only. now it is storing as NULL.

it is not working for me.

Plz suggest how to overcome this problem...!
Zahid Naseer
Zahid Naseer
Forum Newbie
Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)

Group: General Forum Members
Points: 7 Visits: 79
Grasshopper had a nice idea in response to your post... I am pasting his workaround below....it works!!!


----------------------------------------
GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: 6/17/2013 2:51 PM
Points: 21, Visits: 143

"A quick update... temporary solution is to actually turn off the "use headers" option in the connection so that the first row is text (i.e. import the headers then delete the header row later). Rubbish solution as I then need to convert the non-text fields back to whatever they are meant to be. "

----------------------------------------
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search