If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > Insert Data from One column of Table2 to another Column od Table 1

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-11-03, 11:49
Krithika2 Krithika2 is offline
Registered User
 
Join Date: Nov 2003
Posts: 8
Insert Data from One column of Table2 to another Column od Table 1

Hi

I have two tables with equal number of records in both the tables.
I need to add a new columnA in TableA and paste the data of ColumnB in TableB.I can create the ColumnA in TableA by a different ALTER sql.But I couldnt use the UPDATE sql because there is no join field between the two tables.

The only relation i need to use is the one to one reference index of the record between two tables.

Table A

ColX ColY Colz
xx ee ee
dsf sdf sfd


Table B

ColB
5
6

I need to add a new column A in Table A and move the data from ColB in TableB.

The final table i need is

Table A

ColX ColY Colz ColA
xx ee ee 5
dsf sdf sfd 6

Can anybody help me solve this.

Thanks in advance,
Krithika
Reply With Quote
  #2 (permalink)  
Old 11-12-03, 02:44
khibinite khibinite is offline
Registered User
 
Join Date: Oct 2003
Posts: 63
Hello!

I am afraid you couldn't make it by the MySQL facilities. So, you could make it via any another prog. language. I could advise how to make it in PHP, Python or in Delphi.
Reply With Quote
  #3 (permalink)  
Old 11-12-03, 10:41
Krithika2 Krithika2 is offline
Registered User
 
Join Date: Nov 2003
Posts: 8
Question Copying and pasting a Column in ACCESS VBA

Hi khibinite,

Can you let me know , how to atleast copy and paste the columnB of TableB into ColumnA of TableA by invoking the Access Application in VB.

My code in VB is something like


Set oAccess = CreateObject("Access.Application")

oAccess.OpenCurrentDatabase App.Path & "\" & gsDBName

oAccess.DoCmd.CopyObject , TableA,acTable ,TableB ( I wanted just a column here)

I could copy the existing table as a whole into a new table , but I couldnt just copy a column to the existing table.

Can you help with this.

Thanks for your reply.

-Krithika
Reply With Quote
  #4 (permalink)  
Old 11-13-03, 02:18
khibinite khibinite is offline
Registered User
 
Join Date: Oct 2003
Posts: 63
Re: Copying and pasting a Column in ACCESS VBA

Hello, Krithika

Quote:
Originally posted by Krithika2
Hi khibinite,

Can you let me know , how to atleast copy and paste the columnB of TableB into ColumnA of TableA by invoking the Access Application in VB.

Sorry, but I am not experienced in VB at all .
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On