By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,397 Members | 1,425 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,397 IT Pros & Developers. It's quick & easy.

What is this doing?

P: n/a
Dan
Hi All,

Firstly my apologies. I am not really an access user so if this
question seems fundamental I am sorry.

I am trying to replicate this query using another programming language.
Want I am in need to assistance with is merely clarification that it is
doing what I think it is...

<snip>...
FROM
tbl_QueryPeriod,

qry_3DGridCells
INNER JOIN ((tbl_Emission
INNER JOIN (tbl_SourceEmissionAssoc
INNER JOIN tbl_SourceCellAssoc
ON
(tbl_SourceEmissionAssoc.dynamics_id=tbl_SourceCel lAssoc.dynamics_id)
AND
(tbl_SourceEmissionAssoc.source_id=tbl_SourceCellA ssoc.source_id)
AND
(tbl_SourceEmissionAssoc.source_id=tbl_SourceCellA ssoc.source_id)
AND
(tbl_SourceEmissionAssoc.dynamics_id=tbl_SourceCel lAssoc.dynamics_id))
ON
tbl_Emission.emis_id=tbl_SourceEmissionAssoc.emis_ id)
INNER JOIN tbl_HourlyActivity ON
tbl_SourceEmissionAssoc.hourprofile_id=tbl_HourlyA ctivity.hourprofile_id)

ON qry_3DGridCells.cell_id=tbl_SourceCellAssoc.cell_i d

WHERE (((tbl_HourlyActivity.hour)>=[start_hour]
AND (tbl_HourlyActivity.hour)<=[end_hour]))

I am under the impression that this query does the following
1. joins tbl_SourceEmissionAssoc to tbl_SourceCellAssoc using source_id
and dynamic_id (I am assuming that the repeated statements are solely
dirty coding from the origional writer)
2. joins the result of this to tbl_Emission using emis_id
3. joins the result of this to tbl_HourlyActivity using hourprofile_id
4. joins the result of this to qry_3DgridCells using cell_id

And the whole data set is filtered between a start and finish time. Is
this correct? Your advice is greatly appreciated.

Thanks in advance

Dan

Oct 16 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Dan wrote:
Hi All,

Firstly my apologies. I am not really an access user so if this
question seems fundamental I am sorry.

I am trying to replicate this query using another programming language.
Want I am in need to assistance with is merely clarification that it is
doing what I think it is...

<snip>...
FROM
tbl_QueryPeriod,

qry_3DGridCells
INNER JOIN ((tbl_Emission
INNER JOIN (tbl_SourceEmissionAssoc
INNER JOIN tbl_SourceCellAssoc
ON
(tbl_SourceEmissionAssoc.dynamics_id=tbl_SourceCel lAssoc.dynamics_id)
AND
(tbl_SourceEmissionAssoc.source_id=tbl_SourceCellA ssoc.source_id)
AND
(tbl_SourceEmissionAssoc.source_id=tbl_SourceCellA ssoc.source_id)
AND
(tbl_SourceEmissionAssoc.dynamics_id=tbl_SourceCel lAssoc.dynamics_id))
ON
tbl_Emission.emis_id=tbl_SourceEmissionAssoc.emis_ id)
INNER JOIN tbl_HourlyActivity ON
tbl_SourceEmissionAssoc.hourprofile_id=tbl_HourlyA ctivity.hourprofile_id)

ON qry_3DGridCells.cell_id=tbl_SourceCellAssoc.cell_i d

WHERE (((tbl_HourlyActivity.hour)>=[start_hour]
AND (tbl_HourlyActivity.hour)<=[end_hour]))

I am under the impression that this query does the following
1. joins tbl_SourceEmissionAssoc to tbl_SourceCellAssoc using source_id
and dynamic_id (I am assuming that the repeated statements are solely
dirty coding from the origional writer)
2. joins the result of this to tbl_Emission using emis_id
3. joins the result of this to tbl_HourlyActivity using hourprofile_id
4. joins the result of this to qry_3DgridCells using cell_id

And the whole data set is filtered between a start and finish time. Is
this correct? Your advice is greatly appreciated.

Thanks in advance

Dan
Your dissection appears to be entirely correct. Note also, the addition
of "tblQueryPeriod", which is not joined anywhere in your example,
creates a Cartesian product.

--
Smartin
Oct 16 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.