I have a values like this in one of the Column(PIDS) of my SQL Server table. I would like to SPLIT this column into two separate columns based on the ID value Please. Any value after GID: should go to GID column and any value after PACKAGEID: should go to PACKAGEID column. Could you please help me on this.
PIDS
GID: 2672, PACKAGEID: 91290
PACKAGEID: 130116, GID: 7d78b
GID: 09e541, PACKAGEID: 17105
GID: 14e3ba, PACKAGEID: 80017
PACKAGEID: 730829, GID: a871c
PACKAGEID: 1009409, GID: c8b2
Expected OUTPUT :
Either like this
GID | PACKAGEID |
---|---|
2672 | 91290 |
7d78b | 130116 |
09e541 | 17105 |
14e3ba | 80017 |
a871c | 730829 |
c8b2 | 1009409 |
or
GID | PACKAGEID |
---|---|
GID:2672 | PACKAGEID:91290 |
GID:7d78b | PACKAGEID:130116 |
GID:09e541 | PACKAGEID:17105 |
GID:14e3ba | PACKAGEID:80017 |
GID:a871c | PACKAGEID:730829 |
GID:c8b2 | PACKAGEID:1009409 |
Sreeni P is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.