Hi ,
I have a table that has text like :
Code Order_Reasons
-----------------------------
PrimRose 1-2, 3-2, 12-5
Henna NULL
Basil 2-12,3-19,3-23,5-50,5-51
I have to put this data in another table as :
Code Order_Reasons
-----------------------------
PrimRose 1-2
PrimRose 3-2
PrimRose 12-5
Basil 2-12
Basil 3-19
Basil 3-23
Basil 5-50
Basil 5-51
This is actually a part of migration that i am doing and i want to know what the most efficient method to do it. I am going to do it in production only one time
(
we are absorbing an outdated application into a new enhanced one...the old one used to store all the order_reasons as one big concatenated string. Now i need to store it in separate rows ( for the reasons that are commaseparated) for the new app
)
Shall i just go ahead and write a small procedure for the same ,or is there a kill-bill query that can do the work for me..... (Eg : insert into new_table <killbill query> )?
Thanks!
Regards,
S. Jayaram Uparna .
I have a table that has text like :
Code Order_Reasons
-----------------------------
PrimRose 1-2, 3-2, 12-5
Henna NULL
Basil 2-12,3-19,3-23,5-50,5-51
I have to put this data in another table as :
Code Order_Reasons
-----------------------------
PrimRose 1-2
PrimRose 3-2
PrimRose 12-5
Basil 2-12
Basil 3-19
Basil 3-23
Basil 5-50
Basil 5-51
This is actually a part of migration that i am doing and i want to know what the most efficient method to do it. I am going to do it in production only one time
(
we are absorbing an outdated application into a new enhanced one...the old one used to store all the order_reasons as one big concatenated string. Now i need to store it in separate rows ( for the reasons that are commaseparated) for the new app
)
Shall i just go ahead and write a small procedure for the same ,or is there a kill-bill query that can do the work for me..... (Eg : insert into new_table <killbill query> )?
Thanks!
Regards,
S. Jayaram Uparna .