473,776 Members | 1,498 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

5 New Member
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 2597
dgreenhouse
250 Recognized Expert Contributor
@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
anil2083
5 New Member
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 Recognized Expert Contributor
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
33945
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}; What would be the best way to accomplish this? This is what i came up with:
2
3783
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) Thanks for any help Bob
3
6123
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 designers in the designers table (which has fields like: id, fname, lname). How can my select return the possibly several designers for a product, with the rest of the row data, like price, name, etc.?
1
5247
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 other table. How do I do it? I get error messages when trying different approaches. In the end, I removed the unique key/autoincrement, inserted and ID field in the source and then did copy&append records in the edit menu and changed it all back....
3
29604
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, 1,2,34,56,67,, afg, ttt, 3,4,5,6,,,,,
3
3202
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
5349
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
1697
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 result set rs =select (ID) from Tab1 where colmB is null LOOP rs select ID2 from tab2 where colC=ID
4
7712
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? Thanks in advance, Brugu
1
2179
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 2 2 1 3 4 and tblIndex1 Value Data 1 2.5
0
9464
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10289
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10061
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9923
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8952
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7471
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5367
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4031
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2860
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.