HI
Was wondering if anyone has come across this issue or could help solve it.
Currently we have a table which holds contact information
Data Table:
ContactID, FirstTransactionDate, FirstTransactionValue
1,2016-03-01,10.00
2,2016-03-01,25.00
…
We are looking into a method of holding the table’s metadata in a separate table
Metadata Table:
ColumnName,DataType,Length
ContactID,INT,,
FirstTransactionDate,DATETIME,,
FirstTransactionValue,DECIMAL,10
So the process we need to do is check the Metadata Table and if there is a column name which exists in there, but not in the Data Table, then it needs to be created.
So in theory if the Metadata Table was populated with the following:
Metadata Table:
ColumnName,DataType,Length
ContactID,INT,,
FirstTransactionDate,DATETIME,,
FirstTransactionValue,DECIMAL,10
LastTransactionDate,DATETIME,,
LastTransactionValue,DECIMAL,10
Then the process would identify that the last two columns don’t exist in the Data Table and create them accordingly.
So the data table structure would be:
ContactID, FirstTransactionDate, FirstTransactionValue, LastTransactionDate, LastTransactionValue
Has anyone come across this issue before and know a method of doing this?
Thanks in advance!