I have a database which I am migrating to a more useable structure, and one of the problems I have is that it was designed to be totally generic - performance and maintainability is appalling.
The structure of one table is totally vertical:
InstanceID int, Fieldname VarChar (255), FieldValue VarChar (255)
InstanceID is non-unique, The FieldValue can be anything, from a name to an email address.
For each InstanceID I need to extract the list of fields, and their values, and copy them into a new table structure (which I have already created programatically). The list of fields is different for each InstanceID...
Any suggestions...?
The structure of one table is totally vertical:
InstanceID int, Fieldname VarChar (255), FieldValue VarChar (255)
InstanceID is non-unique, The FieldValue can be anything, from a name to an email address.
For each InstanceID I need to extract the list of fields, and their values, and copy them into a new table structure (which I have already created programatically). The list of fields is different for each InstanceID...
Any suggestions...?
Comment