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

Absolute beginner question - Factor1?

P: n/a
Dan
Hello there,

Feel free to point and laugh but I know nothing about access. I am
writing a C++ application to interface between databases and other
applications. The database contains a query that looks like:

SELECT tbl_SourceCellAssoc.cell_id,
Sum(tbl_SourceEmissionAssoc.factor1*tbl_SourceEmis sionAssoc.factor2*tbl_hourlyactivity.coefficient*t bl_SourceCellassoc.fraction*tbl_emission.nox)
AS NOX, First(qry_3DGridCells.X) AS X, First(qry_3DGridCells.Y) AS Y,
First(qry_3DGridCells.H) AS H INTO tbl_EmissionsRes
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]))
GROUP BY tbl_SourceCellAssoc.cell_id;

All looks like a bit of a mess to me. Now I know what most of this
means. I would like to know...

- What is factor1? and Factor2?
- What does 'First(qry_3DGridCells.H) AS H INTO... do?

These queries take about an hour to run (huge data sets and bad
programming) so I can't investigate it manually without sitting here
for ages so I would really appreciate any help you can provide

Dan

Sep 1 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
.factor1, .factor2, .coefficient, .fraction, .nox are all fields in
the various tables of the query.

Note: if you are writing an application in C++ to interface with
Access, you could save yourself a lot of time (and heartache) by writing
it in C#. C# (and VB.Net) have a plethora of already built compoenets
for connecting to Access (and almost every other RDBMS DB on the market
- server and non-server based)

Rich

*** Sent via Developersdex http://www.developersdex.com ***
Sep 1 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.