473,327 Members | 2,094 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

How to migrate comma separated values from one table to another table?

How to migrate the comma separated values from one table to another table?
suppose we have table i.e XYZ and we have comma separated values in few columns i.e( column_name and values are A,B,C,D).Now i have to migrate these comma separated values into new table i.e PQR.

Example:
Table1
column_name1 complexion
values : VF,F,AVG etc..
column_name2 profession
values : TEA,LECT etc...

now i want to migrate into another table:Table2
column_name1 complexion
values:VF
values:F
values:AVG

column_name2 profesion
values:TEA
values:LECT
May 5 '10 #1
3 2562
dgreenhouse
250 Expert 100+
@anil2083
I'm unclear on what you are asking. From the looks of it, you're trying normalize the column values. Is this correct? Or are you truly trying to transfer the records from one table to another? If you're trying to normalize, then you'll need to parse out each value and insert with a non-unique key into the receiving table. If you want to just transfer "as is", then just do a record transfer - possibly using MySQL's: INSERT ... SELECT statement.
May 8 '10 #2
yes,i am trying to normailize.but how to parse out each value and insert with a non unique key into the reciving table?
May 8 '10 #3
dgreenhouse
250 Expert 100+
You could try PHP's str_getcsv function...
May 19 '10 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: idog | last post by:
If I start off with a string which contains comma separated ints. I want to move this into an int array so i can do sorting. I thought I might get this to work: int test = {textBox1.Text}; ...
2
by: RD | last post by:
S= myTxtStrean.Readline gives me a string. How do I extract the fields separated by commas for instance 1,123456,345632,7876543 1,234567890,5432,87654 (values are not each the same length) ...
3
by: starman7 | last post by:
I'm attempting a query that gathers product data for a particular product id. One of the items is designer(s) which can be more than one. The product table has comma separated id's of the...
1
by: Jan | last post by:
I have a table with autoincrement unique ID plus name (required not to be blank) and other fields. I have a list of names in another table and would like to do insert to the name field of the...
3
by: mahe23 | last post by:
All, How do One convert a comma separated column from a text file into rows in oracle. I have a scenario where the list of comma separated values changes dynamically. It is like: abc, ttt,...
3
by: shark | last post by:
Hi All, i hv created a sp as Create proc P @iClientid varchar (100) as Begin select * from clients where CONVERT(VACHAR(100),iClientid) in( @iclientid)
1
by: alister joseph | last post by:
hi I have two tables, i have to combine them & a column should contain comma separated value. example 1 a 2 b 2 c 2 d 3 a
1
by: lunas | last post by:
hi i have to update a table based on a criteria with value selected from another table. i am writting a java progg for it . i just want to know can it be done with one statement. my purpose is ...
4
by: flavourofbru | last post by:
Hi, In the datagridview control, one of my column has multiple values separated by a comma Is there a way to get individaual values which are separated by a comma from that particular cells? ...
1
by: zoeb | last post by:
Currently I have a table, and would like the calculate a field in the table by referencing values from another 3 tables. i.e. tblData Index1, Index2, Index3, Value 1 2 3 2...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.