View Full Version : query help


rkrause
01-12-2010, 09:58 AM
I have 3 tables in my access database. upr00100, main, innovative
each one has a primary key of employid. Im having trouble getting a query written so im not repeating data. im think i need a union but im not having any luck with it. heres the fields i have for each table:
UPR00100 -- EMPLOYID, INACTIVE, LASTNAME, FRSTNAME,BRTHDATE, DEPRTMNT,STRTDATE

MAIN -- employid, WrittenBy, DateAndTimeOfEvent, AreaObserved, Main.Description, FollowUpRequired, FollowUpTime

INNOVATIVE -- employid, Supervisor, .DateSubmitted, Benefit, Idea, Implement, Status

Rabbie
01-12-2010, 12:12 PM
If all tree tables it appears that the data for each Empoyid can be combined in 1 table. It looks like you have three tables with 1to 1 joins. These normally are rare so I am a little surprised to see you have 2 such joins. Its hard to be sure what you are tryig to model here so more background info would be helpful

Brianwarnock
01-12-2010, 12:36 PM
Ah! Rabbie I suspect that they are not 1 to 1 but 1 to many, hence the duplicate data. As you say more info is needed.


Brian

Rabbie
01-12-2010, 12:48 PM
Ah! Rabbie I suspect that they are not 1 to 1 but 1 to many, hence the duplicate data. As you say more info is needed.


BrianYou may well be right! I based my assumpion that all three tales had a pK of employid. More info should clarify the issue

Brianwarnock
01-12-2010, 12:55 PM
Actually you are correct , he did say they were pKs, Note to self - read more carefully.

Brian

Rabbie
01-12-2010, 12:58 PM
Actually you are correct , he did say they were pKs, Note to self - read more carefully.

Brian
The most interesting may be what he didn't say. No mention if he has set up relationships between the tables. Still perhaps he will answer our questins so we can help him.