I have a file written from a Cobalt program that produces a pipe delimeted file. The file contains white space and "null" spaces that I need to get rid of and then rewrite the file. What is the best way to do that? I have sql server and visual studio that can be used to write the script, but not sure the best one to use or exactly how. The script will need to read through many different files in a folder. The data is being converted from an old system into a new one. Also, I would need to keep spaces between words, ie a business name or an address. I was going to use sql, but can only find examples reading fields in a database.
Example file (one line): 0000000009|LName |FName | | | | | | |1|1|0|000|000|000000000| 1||null null null| | null null|null null null null| |1|0|
Desired output: 0000000009|LName|Fname|||||||1|1|0|000|000|000000000|1||||||1|0|
Thanks!!