+Home
+Resumé
+Applications
 - VBScript
+Fedora
+GuestBook
 
   VBScript Next Up - Database Extractions with VBScript: Solving the Floating Point Problem

Converting a table from a legacy database to a table with a new relational schema may create a problem for the DBA. The main issue is the number of keys in the old table, vs. the number of keys in the new table. The number of keys may not have changed, but a compound key may have been created in the new table, that didn't exist in the old table.

If the old table can be exported to a file delimited by a semicolon, then an empty column that should contain a key according to the new format, can be easily spotted by the presence of ';;'. The script below substitutes text in place of an empty data element. The result is a new delimited file that can be easily imported to the database of your choice. This script was written for a database that resides in SQL Server 2000.