Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase ««123»»

Excel import - force column to be string (SSIS 2005) Expand / Collapse
Author
Message
Posted Tuesday, March 12, 2013 2:49 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: 2 days ago @ 12:02 PM
Points: 13, Visits: 267
It would be nice to know where you do the QUOTENAME(columnname, '"')
Post #1430110
Posted Monday, August 19, 2013 9:47 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, July 17, 2014 5:53 AM
Points: 2, Visits: 213
Jeff Moden (10/16/2011)
The way I solved this problem for my group was to simply use QUOTENAME(columnname, '"') and make sure that I used '"' as the text qualifier.


Can anyone explain more about this??
This kind of statement is like "I know how, but I won't tell." kinda statement.

Best Regards.
Post #1486092
Posted Tuesday, August 20, 2013 6:53 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Yesterday @ 9:06 AM
Points: 1,166, Visits: 1,192
Donny Z (8/19/2013)
Jeff Moden (10/16/2011)
The way I solved this problem for my group was to simply use QUOTENAME(columnname, '"') and make sure that I used '"' as the text qualifier.

Can anyone explain more about this??
This kind of statement is like "I know how, but I won't tell." kinda statement.

Take a look at: http://technet.microsoft.com/en-us/library/ms176114(v=sql.105).aspx

A simple search brought that back.

HTH,
Rob
Post #1486226
Posted Tuesday, August 20, 2013 9:46 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Thursday, July 24, 2014 8:41 AM
Points: 2,818, Visits: 2,553
Right click on the Excel source transform, choose Show Advanced Editor, and modify the column data type properties in the Input and Output properties tab
Post #1486336
Posted Tuesday, August 20, 2013 10:16 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Yesterday @ 8:25 AM
Points: 124, Visits: 308
I am stuck at a similar dilemma with Excel source and Jet provider.

Cannot edit registry key.

I was thinking about this.. but I am not sure if it is possible.. Can I add a dummy row with more than 255 chars each time data flow task runs by using a script task and then take the dummy row out using an identifier?

Script Task (add dummy row, move all rows one level below dummy)
Excel Source
Some other Task (which you would normally go to and take dummy row out)

I have near zero scripting skills and am looking for help to see if this is a possibility

Post #1486354
Posted Tuesday, August 20, 2013 11:38 PM


SSCarpal Tunnel

SSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal Tunnel

Group: General Forum Members
Last Login: Today @ 1:50 AM
Points: 4,986, Visits: 11,684
whereisSQL? (8/20/2013)
I am stuck at a similar dilemma with Excel source and Jet provider.

Cannot edit registry key.

I was thinking about this.. but I am not sure if it is possible.. Can I add a dummy row with more than 255 chars each time data flow task runs by using a script task and then take the dummy row out using an identifier?

Script Task (add dummy row, move all rows one level below dummy)
Excel Source
Some other Task (which you would normally go to and take dummy row out)

I have near zero scripting skills and am looking for help to see if this is a possibility



If you can't use a CSV as your source instead - which is my preferred approach whenever the subject of Excel comes up - then yes, you can do this. Use a Conditional Split in your dataflow to send the unwanted row to an unused output.



Help us to help you. For better, quicker and more-focused answers to your questions, consider following the advice in this link.

When you ask a question (and please do ask a question: "My T-SQL does not work" just doesn't cut it), please provide enough information for us to understand its context.
Post #1486522
Posted Wednesday, August 21, 2013 6:10 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Yesterday @ 8:25 AM
Points: 124, Visits: 308
What about adding the dummy line? I am not loading the file,to open it and add the line. It is getting loaded through application GUI on client side.

Post #1486652
Posted Wednesday, August 21, 2013 6:29 AM


SSCarpal Tunnel

SSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal Tunnel

Group: General Forum Members
Last Login: Today @ 1:50 AM
Points: 4,986, Visits: 11,684
whereisSQL? (8/21/2013)
What about adding the dummy line? I am not loading the file,to open it and add the line. It is getting loaded through application GUI on client side.



Sorry - I misunderstood your post - I thought that the dummy line was going to be in the source file.



Help us to help you. For better, quicker and more-focused answers to your questions, consider following the advice in this link.

When you ask a question (and please do ask a question: "My T-SQL does not work" just doesn't cut it), please provide enough information for us to understand its context.
Post #1486661
Posted Wednesday, August 21, 2013 6:39 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, July 17, 2014 5:53 AM
Points: 2, Visits: 213
robert.gerald.taylor (8/20/2013)
Donny Z (8/19/2013)
Jeff Moden (10/16/2011)
The way I solved this problem for my group was to simply use QUOTENAME(columnname, '"') and make sure that I used '"' as the text qualifier.

Can anyone explain more about this??
This kind of statement is like "I know how, but I won't tell." kinda statement.

Take a look at: http://technet.microsoft.com/en-us/library/ms176114(v=sql.105).aspx

A simple search brought that back.

HTH,
Rob

Hi Rob,

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

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.
--------------------------------------

@whereisSQL?
I already spent few days looking for answer like this for SSIS 2008 (yup, the saga continues to 2008) and bcoz it's driver caused problem, I'm stuck w/ converting the excel to other delimited format file then use SSIS to read the result file. Still trying to find free converter which can be executed through CMD prompt though
Post #1486665
Posted Wednesday, August 21, 2013 7:36 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Yesterday @ 8:25 AM
Points: 124, Visits: 308
I read here that the ACE OLEDB 12.0 provider overcomes it.

Installed it, but no go. Stumped..

edit - tried to make less clutter with the url tag
Post #1486709
« Prev Topic | Next Topic »

Add to briefcase ««123»»

Permissions Expand / Collapse