I guess, it is quite common task. There is a table A let's say in Visual Foxpro and needs to be transformed to table B in SQL Server 2008. Operation is going to be repetitive. Column names may be changed , some input columns dropped , column types may be changed ( string <=> int ), some output columns generated ( GUID , identity ) . Also normalization may happen where input table results in 2 joined with pivot table - let's drop this case for simplicity
I know about SSIS existence , probably there are scripts which can do what I described ?
I've already written C# program which reads XML ( snippet below ) and does mapping and out key generation but just thought whether all that - another wheel reinvention.
<Tables>
<Table inTbl="A" outTbl="B">
<Keys>
<Key name="it_pk" type="GUID">
</Keys>
<Mappings>
<Column inCol="hxkey" outCol="it_tariff" />
<Column inCol="txt" outCol="it_description" />
<Column inCol="uq1" outCol="it_uq1" />
<Column inCol="date1" outCol="it_startdate" />
<Column inCol="date2" outCol="it_stopdate" />
</Mappings>
</Table>
</Tables>