wdbates
asked on
Editing a file using C# or VB
Dear Microsoft Visual C# 2008 and Microsoft Visual Basic 2008Experts;
I need to edit a .CSV file using the Script Task within SSIS 2008. The file will be comma delimited (,) or carrot delimited (^), text qualifier is a quote (“), header row delimiter is a line feed (LF) and column names in the first data row. Searching though the file there is a common pattern of strings that needs replacing; examples inside the square brackets would be [“”)] replaced with [)], [“”.] replaced with [.], [ “,””] replaced with [“,”] and [\r\n] replaced with a blank space.
I have seen examples of .vbs scripts using replacement like;
if !foo!==ex3 set foo=ex5
or
If InStr(strLine,""")")> 0 Then
	strLine = Replace(strLine,""")",")")
I need something to go within the Script Task in SSIS 2008.
I need to edit a .CSV file using the Script Task within SSIS 2008. The file will be comma delimited (,) or carrot delimited (^), text qualifier is a quote (“), header row delimiter is a line feed (LF) and column names in the first data row. Searching though the file there is a common pattern of strings that needs replacing; examples inside the square brackets would be [“”)] replaced with [)], [“”.] replaced with [.], [ “,””] replaced with [“,”] and [\r\n] replaced with a blank space.
I have seen examples of .vbs scripts using replacement like;
if !foo!==ex3 set foo=ex5
or
If InStr(strLine,""")")> 0 Then
	strLine = Replace(strLine,""")",")")
I need something to go within the Script Task in SSIS 2008.
ha ha, ;-) caret not carrot
ASKER
Andy; you are correct! And John, I need this in C# 2008 or VB 2008 and within SSIS script.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks guys. Sorry for the delay.
Open in new window