I have source table like below
SwitchID|InvalidPorts
SW1|1-3,5-6,9
SW2|6-7,8
Now I need to insert individual records in the destination table.
Port Table
SwitchID|PortNumber
SW1|1
SW1|2
SW1|3
SW1|5
SW1|6
SW1|9
SW2|7
SW2|8
Any hints on how to parse the string and sequence to create the individual records is appreciated?
SwitchID|InvalidPorts
SW1|1-3,5-6,9
SW2|6-7,8
Now I need to insert individual records in the destination table.
Port Table
SwitchID|PortNumber
SW1|1
SW1|2
SW1|3
SW1|5
SW1|6
SW1|9
SW2|7
SW2|8
Any hints on how to parse the string and sequence to create the individual records is appreciated?