Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
Jason2112
Starting Member
17 Posts |
Posted - 2009-08-03 : 17:42:13
|
| I have a view that I'm exporting to flat file via SSIS and I get a lot of blank spaces (i.e. if the field is set for 10 characters, and I have 4 characters of data, I get 6 blank characters). I see that I can use the TRIM function, but I need to do this for 25 columns. Is there a quick way to do all columns? Thanks. |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
Jason2112
Starting Member
17 Posts |
Posted - 2009-08-03 : 17:59:23
|
quote: Originally posted by tkizer No. Are you using char data type or varchar? What column delimiter are you using?
Some are nvarchar, some are nchar (sourced from multiple tables). It's comma delimited in the Data Flow flat file destination.One thing I should mention is that this also affects fields with no data. So I have a bunch of fields that will always be blank, so I just created them as nvarchar(1) so they would flow through my views. These fields show up with a single blank space in the CSV file ( as , , , rather than ,,,). |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
|
|
|