+ Reply to Thread
Results 1 to 3 of 3

Updating One Table from another Table

  1. #1
    Forum Contributor
    Join Date
    04-23-2009
    Location
    IOWA
    MS-Off Ver
    2010 Professional
    Posts
    270

    Updating One Table from another Table

    I have a database that is made by a third party.
    I have built a second database basically as a bunch of addons for the for third party.
    They have a customer table in their db. (with less fields then i need)
    I have a customer table in my db. (with more fields then theirs)
    I intend to have a query that runs on open of my database, what it will do is:
    Match the two tables up against each other. Update any field that has been updated in the third party db to my db.
    It will add any customers that are in the third party database, (that aren't in my db)in to my database.

    I hope all that makes sense. I am really not sure where to start. Do I use an update query or append? I want the data to be stored in both places. (only because I have no choice)

    Let me know if you need more information.

    Thanks

    Dan
    Last edited by split_atom18; 07-30-2009 at 04:19 PM.
    "I am not a rocket scientist, I am a nuclear engineer." - Split_atom18
    If my advice has been helpful to you, then please help me by clicking on the "Star" and adding to my reputation, Thanks!

  2. #2
    Forum Expert ConneXionLost's Avatar
    Join Date
    03-11-2009
    Location
    Victoria, Canada
    MS-Off Ver
    2010
    Posts
    2,952

    Re: Updating One Table from another Table

    Hi Dan,

    You may want to consider using more than one query and take it a step at a time.

    First query to append new records to your db
    Second query to update your current records

    There should be no problem in running both queries from the On Open event.

    Cheers,
    Would you like to say thanks? Please click the: " Add Reputation" button, on the grey bar below the post.

  3. #3
    Forum Contributor
    Join Date
    04-23-2009
    Location
    IOWA
    MS-Off Ver
    2010 Professional
    Posts
    270

    Re: Updating One Table from another Table

    ConneXionLost,

    Thanks for the suggestions. That is what I was working on doing this morning. I should have posted what I was trying. The append query for somereason was adding new every item each time. so my table was doubling in size. I figured out that problem. Your solution works though thanks much for you help.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1