One of the columns has a string with serial numbers that are comma separated.
What I'm trying to do is create a new temp table with the identityID and the serial number.
This way I can add each parsed out serial number value to our production data with all the other column data
carried over based on the parent records joining on the identityID.
I've seen methods using CTE, Cross Apply, creating a function and more.
I'm looking for something that performs well as the table has 1.7 million rows now before the split
would be done.
Once this is broken down I can then filter out multiple occurrence of the serial numbers.
Still fairly new to SQL and this task has me puzzled. This would have been easy in RPG.
Here is where I stand now because I'm unsure of what direction to go.
-- Test Table
DECLARE @SerialNumber_Table TABLE (SerialNumbers_ID INT,SerialNumber char)
-- Insert statement
INSERT INTO @SerialNumber_Table (SerialNumbers_ID,SerialNumber)