Results 1 to 4 of 4
  1. #1
    Join Date
    Dec 2002
    Posts
    34

    Unanswered: Urgent!!!

    I need help on joining a same table from different database.
    Meaning 1 database is used by 2 users to enter data & now i'm trying to join in become 1 table again.

    i've tried using the "copy-append" method & creating sql union query but having the same error, which is violation due to (i think) could be the primary key duplication from the 2 tables.

    hope i could get a reply ASAP.
    THANKS.
    Last edited by jill; 12-01-02 at 22:54.

  2. #2
    Join Date
    Nov 2002
    Location
    San Francisco
    Posts
    251

    Re: Urgent!!!

    there are two ways....

    1. COPY-PASTE - silly, but it works..... just go to first table, select all fields (click on the top left corner) and CTRL-C, then go to other table and select new blank record (the record with asterix) and paste CTRL-V
    make sure that both tables have the same order of all fields

    2. create APPEND query and append all fields exept those autonumber


    the problem can be if you have data related on autonumber....
    let's say you have CUSTOMER table with autonumber and ORDERS table linked to CUSTOMER autonumber field......

    is this your problem? I can give you detailed info.


    jiri

  3. #3
    Join Date
    Dec 2002
    Posts
    34

    Re: Urgent!!!

    Well, i have solve the first problem earlier. Hmm, i actually missed the import objects function.

    now the 2nd problem. Each time i append, the primary key violation will come out. ok, my database detail is as follow:
    table - EmpTable -> EmpID (primary key), EmpName, Address
    EmpTable1 -> EmpID (primary key), EmpName, Address

    the EmpID is not an autonumber, which means the data is entered by user. So, each time i try to append both tables, that error will come up.

    hope this information helps.
    Last edited by jill; 12-02-02 at 04:02.

  4. #4
    Join Date
    Oct 2002
    Location
    Leicester - UK
    Posts
    820
    then i would suggest changing the table to include a user field and link that with the primary key ie user and empid = primary key that way the key can't be duplicated as a table entry, another method would be to have the empID modified before appending to inclued the users intials

    ie howard anderson enters the empID 556723y3 becomes 556723y3HA

    trivia: ten points if anyone can spot the Sci-Fi reference in this post and place it
    Definition of a Beginner, Someone who doesn't know the rules.

    Definition of an Expert, Someone who knows when to ignore the rules.

Posting Permissions

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