Click here to Skip to main content
15,891,184 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
how to save data from two table to two table
Posted
Comments
Sandip.Nascar 7-Oct-12 7:37am    
It's not too clear, what you want to do? Please be more specific of your problem.
Zoltán Zörgő 7-Oct-12 8:04am    
Just like that.
What database engine? On database side, or via a client? One-to-one or some transformation is needed? Or it is a web related question, and you are dealing with some html tables? Or you want to copy Excel or Word tables...? Did you really thought, that somebody could understand those few words, that are not even a sentence?

1 solution

if You mean Table such as two Dimensional Array in C# so one of ways :

C#
// Table num1
          int[,] num1 = {
                            {1,2},
                            {3,4},
                            {5,6},
                            {7,8}
                        };
          // Table num2
          int[,] num2 = {
                            {9,10},
                            {11,12},
                            {13,14},
                            {15,16}
                         };
          // Table num3, num4
          int[,] num3 = new int[4, 2];
          int[,] num4 = new int[4, 2];

          // Save to Table num3
          for (int i = 0; i < 4; i++)
              for (int j = 0; j < 2; j++)

                  num3[i, j] = num1[i, j];

          // Save to Table num4
          for (int i = 0; i < 4; i++)
              for (int j = 0; j < 2; j++)
                  num4[i, j] = num2[i, j];
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900