Need help with joins and queries

jdcollins88

New Member
Joined
Jan 28, 2013
Messages
5
Hello, I am very new to access and am having trouble getting started. I have acquired an already constructed access database and am trying to pull out data in a specific format so I can run some stats. I have multiple tables, two of which contain the information I am after. One of the tables contain the capture information including which net the animal was captured in, which site, date etc. Another table contains the information on said net for that site. For example

Table 1.
SpeciesDateSiteNet
MYLU8/14/2010FR143A
MYSE8/16/2011FR143A
MYSO8/16/2011FR142A

<tbody>
</tbody>

Table 2.
SiteDateNet A HeightNet B Height
FR1438/14/20102.63.5
FR1438/16/20105.22.6

<tbody>
</tbody>

Currently only site name is joined between the tables, I believe I should join date as well, but am a little confused as how to join the net to net height, instead of trying to explain here is my desired outcome.

SiteDateNetHeight of net Number captured
FR1438/14/2010A2.6 1
FR1438/16/2011A5.22

<tbody>
</tbody>

I've tried multiple ways of querying without any luck so here I am.
If further clarification is needed I will be more than happy to provide it

Thanks for the help
Jason
 
Last edited:

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
Here is a SQL statement to capture the data you are showing.
Code:
SELECT Table1.Site, Table1.Date1, Table1.Net, Table2.NetAHeight
FROM Table1 INNER JOIN Table2 ON (Table1.Date1 = Table2.Date1) AND (Table1.Site = Table2.Site);

Note I changed the Date Field to Date1 as Date is a reserved name in Access and may cause issues in the future.
 
Upvote 0

Forum statistics

Threads
1,214,922
Messages
6,122,281
Members
449,075
Latest member
staticfluids

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top