Quantcast
Channel: SQL Server Integration Services forum
Viewing all articles
Browse latest Browse all 24688

Column Width When Importing Flat File with SSIS

$
0
0

I had an earlier problem with using BULK INSERT that involved all sorts of permissions issues that were just way too restrictive. I think I understand - vaguely - why those issues are there, but they are causing me all sorts of grief.

The problem was that the Import Wizard assigned a column output width - even when the data is delimited, in my case with a tab - that defaults to 50. Fine, I can analyze the current data dump and determine the max width I need for each column, adjust the column widths in the Wizard accordingly and save the details as an SSIS package. But, next month, the widths may not be the same. That's why I was trying to go with BULK INSERT, because I could just set the fields that are variable with varchar(max). If the widths fluctuate, no big deal, the format can handle that. But, there's no way to put "max" in the field width sections of the wizard - at least, not one that I've found.

So, someone suggested that I use SSIS. OK, that seemed interesting and I see that SSIS is pretty powerful. But, the Flat File Connection Manager still has the same problem as the Import Wizard did; I can't define variable length output column sizes.

How can I tell the Connection Manager that the output columns need to be variable length?

For that matter, since the file is defined as delimited and not fixed length, why do I even need to bother with defining column widths?

Thanx!


Viewing all articles
Browse latest Browse all 24688

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>