Absolute beginner question - Factor1?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Dan

    #1

    Absolute beginner question - Factor1?

    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_SourceCellA ssoc.cell_id,
    Sum(tbl_SourceE missionAssoc.fa ctor1*tbl_Sourc eEmissionAssoc. factor2*tbl_hou rlyactivity.coe fficient*tbl_So urceCellassoc.f raction*tbl_emi ssion.nox)
    AS NOX, First(qry_3DGri dCells.X) AS X, First(qry_3DGri dCells.Y) AS Y,
    First(qry_3DGri dCells.H) AS H INTO tbl_EmissionsRe s
    FROM tbl_QueryPeriod , qry_3DGridCells INNER JOIN ((tbl_Emission INNER
    JOIN (tbl_SourceEmis sionAssoc INNER JOIN tbl_SourceCellA ssoc ON
    (tbl_SourceEmis sionAssoc.dynam ics_id=tbl_Sour ceCellAssoc.dyn amics_id)
    AND (tbl_SourceEmis sionAssoc.sourc e_id=tbl_Source CellAssoc.sourc e_id)
    AND (tbl_SourceEmis sionAssoc.sourc e_id=tbl_Source CellAssoc.sourc e_id)
    AND
    (tbl_SourceEmis sionAssoc.dynam ics_id=tbl_Sour ceCellAssoc.dyn amics_id))
    ON tbl_Emission.em is_id=tbl_Sourc eEmissionAssoc. emis_id) INNER JOIN
    tbl_HourlyActiv ity ON
    tbl_SourceEmiss ionAssoc.hourpr ofile_id=tbl_Ho urlyActivity.ho urprofile_id)
    ON qry_3DGridCells .cell_id=tbl_So urceCellAssoc.c ell_id
    WHERE (((tbl_HourlyAc tivity.hour)>=[start_hour] And
    (tbl_HourlyActi vity.hour)<=[end_hour]))
    GROUP BY tbl_SourceCellA ssoc.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_3DGr idCells.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

  • Rich P

    #2
    Re: Absolute beginner question - Factor1?

    .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 ***

    Comment

    Working...