Replacing NULL Characters From Within A Flat File With Script?
Jul 25, 2007
Here's one for the group:
I have a fixed-width flat file. Within some of the rows, I have embedded NULL characters. The inherit problem is that NULL characters are string terminators, so using a flat file source doesn't allow the capturing of these NULL characters or any characters after the first NULL character -- only the string up to the NULL character.
So, within SSIS, what would be the best way to replace NULL characters with a SPACE character? My file is fixed-width, and replacing with a space will allow me to keep the length the same. I am not opposed to running a script task against the file first (before using my flat file source), but would need some guidance as I'm not a .Net guru, by any means.
Unfortunately, going to the bank to have them correct this file has proved fruitless. We're going to have to deal with these characters on our side.
Thanks,
Phil
View 7 Replies
May 16, 2008
Guys ,
I have generated a pipe delimited file using bcp option.
I am getting the ouput for some columns as some some special characters(boxes). When ,I have checked my source data in few columns the data is stored with single space.I can see this special character when opening with editplus only not with notepad.
This flat file will be used to load into oracle table.because of this reason all the rows are failing.
Do ,I need to fix this space issue in my stored procedure
Any suggestions.. to avoid this special character when generating the flatfile.
thanks in advance
View 2 Replies
View Related
Mar 15, 2006
I have a flat file that has fields delimited by tilde {~} and rows delimited by {CR}{LF}. The problem is, my source is spitting out the {NULL} (&H00) at the end of the row.
The data displays correctly in the pre-viewer (with a non-print symbol at the end of the last field), but gives an error when I try to run the package.
Example:
data?~?data?~?data?{NULL}{CR}{LF}
I can process the row in c# using: