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 > PC based Database Applications > Microsoft Access > Joining same table from different db

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-01-02, 21:26
jill jill is offline
Registered User
 
Join Date: Dec 2002
Posts: 34
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 21:54.
Reply With Quote
  #2 (permalink)  
Old 12-02-02, 01:16
playernovis playernovis is offline
Registered User
 
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
Reply With Quote
  #3 (permalink)  
Old 12-02-02, 02:35
jill jill is offline
Registered User
 
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 03:02.
Reply With Quote
  #4 (permalink)  
Old 12-02-02, 05:37
m.timoney m.timoney is offline
Registered User
 
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.
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