I was asked by a local school to write a database export utility to export data from a popular school management program to one that the government requires. The reason being that the government only accepts quarterly reports from its own program.
After ALLOT of hours spent just figuring out the relationships in the poorly written government database I finally compiled my SQL statement requirements but I have a problem.
Due to the poor design and use of data types and columns in the program I am having trouble dynamically putting together the SQL insert statements. Is there a way to create a single SQL statement with the data (formatted correctly) without specifying the data type and insert it into the table?
To give you an Idea there are 192 tables with at least 20 columns each.
Update: This is how my program currently works.
Collect data->Compare required column data type in excel sheet->Format data->Generate SQL Statement->Execute statement
you can quote everything so it will be passed as string. Of course, the data types must mach: