I have 2 semicolon separated string passed to a stored procedure along with other variables with simple values. These semicolon seperated values actually needs to be split and inserted as different rows. Both the semicolon seperated values are not interrelated and hence can be inserted together into 2 different fields in any order.The spliting is done by using Collapse | Copy Code select CAST(DATA AS INT) as id from SplitString('30:40:50',':') but i want to combine both these splits such that i could pass them together into single insert statements.
for example, I have string1 '30:40:50' and string2 '23,58,48,60' and some values @id=101,datecreated...
Now i want to insert this values into a table that would look like this,
101 30 23 Jun 25 2013 12:22PM
101 40 58 Jun 25 2013 12:22PM
101 50 48 Jun 25 2013 12:22PM
101 null 60 Jun 25 2013 12:22PM
Any of the string could be longer or smaller or equal.
I am unable to figure out proper way of doing this
Can anyone please help me with this.