|
|
|
|
|
by yellowapple
2513 days ago
|
|
I actually used Perl last week to whip up two scripts (csv2insert and csv2update) to automate converting CSV files to MSSQL-specific SQL insert/update scripts (respectively). Microsoft's own CSV import tools suck, and it was pretty straightforward to use Text::CSV and print() a bunch of SQL lines. I'd need to do some more polishing before putting it up on GitHub or something (namely: sanitize incoming single-quotes in CSV cells, and possibly break the steps into subroutines), but I was yet again impressed by the ability to automate a bit of text data processing with less than an hour's work. |
|