Is there a way to turn a string of key-value pairs into a table/result-set of key,value?
I have a (smallish - 3 columns, few hundred rows) table with one column that looks like “key1=value1;key1=value2;key2=value3” (short-ish - 3-4 keys)
I’d like to turn that into a result set that looks like (for each row of the source table):
| Pos | Key | Value |
| 1 | key1 | value1 |
| 2 | key1 | value2 |
| 3 | key2 | value3 |
(The possibility of repeated keys means we need the position in addition to the key)
(I’ve omitted e.g. the primary key of the source table, which I would also need to include, but that I’m guessing is straightforward.)
The source table is updated by a pipeline, so I would need to do this either as part of a procedure used by the pipeline, or something that periodically reads the source table and updates a second one.
Any suggestions on how to do this?
Thanks, and Regards,