I'd like to re-ask a question in a more direct and general way:
How do you create a table to store values which could be multiple different types?
In my case, the values provide diagnostics about an event. Ex: Event occurred -> Store readings from multiple PLC's which contain pertinent information about the event. The PLC's could monitor any type of data.
Some examples I can think of:
- Create a column for every possible type and create another column to indicate which column to use
- Ex: Cols: IntVal, StrVal, BoolVal, Type. Vals: null, null, True, "BOOL"
- Store the values no matter what as a varchar