Results 1 to 4 of 4
  1. #1
    Join Date
    Nov 2003
    Posts
    8

    Unanswered: 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

  2. #2
    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.

  3. #3
    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

  4. #4
    Join Date
    Oct 2003
    Posts
    63

    Re: Copying and pasting a Column in ACCESS VBA

    Hello, Krithika

    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 .

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •