Help With Query!

accessir

New member
Local time
Yesterday, 16:12
Joined
May 20, 2010
Messages
8
Hi Folks

Ive been tasked with creating a database for a colleague and have done everything except managed to pull together some more complicated (For me) queries into 1 result - to show in a simple little form/table and ideally a graph too.

Basically I have 2 tables I need to pull a lot of info from together but cannot manage to join (using SQL I found online) or anything else and IM really stumped so hope someone can help.

Table A has fields:
Salesperson
Totalincomegenerated
Aspartofsalescampaign

Tabe B has the same fields and many different ones too but these are shared.

However, I cannot pull together a report or query which shows the following:

Salesperson
Totalincome generated (from both table A and table B)
Aspartofsalescampaign (which is listed A, B, C etc)

Any help here would be MUCH appreciated!!

Regards...
 
Maybe a picture of your tables showing the relationships might help to understand what your goals are...

...but it sounds like you might need to do a little more "normalization'.

For example, why do Table A and Table B hold the same fields?

This LINK might help you understand Normalization.

Come back with more information or questions... either is welcome!
 
Cheers for that. I will look at the database structure (I dont really have the best implementation of the tables and its quite complex to explain) but essentially I do have replicated data on different tables because some of it is needed for querying in different ways and I Had figured no easy way to do these complicated join queries....so, I went for a bit of a lazy approach!

Alas, I think I may not have the best design of tables but its perhaps a bit beyond me the complexities of really intricate relationships.

Will come back with more info
 

Users who are viewing this thread

Back
Top Bottom