Combine 2 records in one

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tromped
    New Member
    • Aug 2006
    • 3

    Combine 2 records in one

    I need to know urgently how to combine 2 records in 1.
  • PEB
    Recognized Expert Top Contributor
    • Aug 2006
    • 1418

    #2
    How do you want to combine 2 records in 1? Can you give us an exemple?

    Comment

    • tromped
      New Member
      • Aug 2006
      • 3

      #3
      Originally posted by PEB
      How do you want to combine 2 records in 1? Can you give us an exemple?
      Record # | LastName | FirstName | Address
      -------------------------------------------------------------------------------
      1 | Visco | John | Empty
      2 | Empty | Empty | 101 Blvd

      The address "101 Blvd" should go into field addess. Can You help?

      Comment

      • PEB
        Recognized Expert Top Contributor
        • Aug 2006
        • 1418

        #4
        Ok I understand what is your problem!
        In your table unfortunatelly I don't see any way to associate the information of the two rows!

        If you have had a simmilar ID in the two records you could proceed to do an aggregate SELCT query and as a result your information should be stored in the same record.

        What kind of result do you want?

        Change the records in the table doing from 2 records 1

        OR

        Visualize the information together in a query ?

        IN the 2 cases you need a common ID to associate the information that have to be placed!

        I suppose that your case is the first one!

        And you want to correct the information in your tables!

        I imagine that you have a common ID in your rows

        So it's better to add a field in your table from type true/ false or Yes / No

        After done that you create an Update query and fill this field for all records with value false No

        Than you create an Append query in wich you group your information in conformity with this common ID for the records and you mark the field of type Yes/No as Yes

        The next step is to execute a Delete query on all records that the field Yes/ No is no If the results with Yes are suitable for you!

        I hope that this'll help! And if you don't know how to create a step from here, or other problem write us!

        Have a nice day!

        Comment

        • MMcCarthy
          Recognized Expert MVP
          • Aug 2006
          • 14387

          #5
          My suggestion would be to export the data to a csv file. You could then read the file in as a comma delimited text file. Opening a recordset of your new table and adding a new record by taking line 1 and line 2 in and putting them into one local string before reading the appropriate positions in the string as part of the AddNew action on the recordset.


          Originally posted by tromped
          Record # | LastName | FirstName | Address
          -------------------------------------------------------------------------------
          1 | Visco | John | Empty
          2 | Empty | Empty | 101 Blvd

          The address "101 Blvd" should go into field addess. Can You help?

          Comment

          • chuak
            New Member
            • Nov 2006
            • 1

            #6
            Originally posted by tromped
            Record # | LastName | FirstName | Address
            -------------------------------------------------------------------------------
            1 | Visco | John | Empty
            2 | Empty | Empty | 101 Blvd

            The address "101 Blvd" should go into field addess. Can You help?
            I encountered the same problem with you too. How do you resolve your problem. Appreciate sharing.

            Comment

            • NeoPa
              Recognized Expert Moderator MVP
              • Oct 2006
              • 32633

              #7
              If you have data from two records that you want merged, how do you determine which records should be joined in this way?
              This seems to be the crux of the matter.
              If you have an identifier in a field which links the relevant records together then there are ways of merging the data - however, that is a prerequisite.

              Comment

              Working...