November 5, 2008 at 12:34 pm
I'm looking for a tool (freeware would be preferred) that will allow you to setup a format for CSV file (date fields, number fields, etc.) and then run a comparison of the expected format to a an actual file.
It would give results in the form of which rows in the files had an issue, which columns in those rows had the issue, and what the issue was.
So if a CSV file is supposed to have an amount value in the Amount column, and Row 3 has a value of "fc", then it would generate an error. Ex: Row "3" Column "Amount" has a bad value "fc" or something very similar.
Any help is appreciated.
...thanks
November 5, 2008 at 8:39 pm
Just use BCP to run it into a temporary staging table with the correct switches set to offload any bad rows into an error file. You should set the "Maximum number of errors" switch to more rows than you expect in the file.
For more info on BCP, please refer to Books Online.
--Jeff Moden
Change is inevitable... Change for the better is not.
November 12, 2008 at 12:06 pm
Thanks for your response.
Yep, we considered that and that is what we'll do if we have to. We'll then have to write a mechanism to do datatype checking and give results.
I was hoping this was a "solved" problem that would shortcut that effort. We can't be the only shop that has to deal with integration using CSV files that are easy to not format "correctly".
Thanks again.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply