I have two SELECT queries:
qry_400m_OG_h and qry_400m_OG_q
they have data on consecutive rounds of an athletic tournament, the h stands for heat and the q stands for quarter finals. the object of the exercise is to have a dataset with perfomances from the 2nd round (quarter finals) listed alongside performances from the 1st round heats. so we end up with something like this:
Bob Smith (CAN) 3 h2 48.7 3 q2 48.6
obviously, not every 1st round competitor gets into the 2nd round, so some fields will be left blank.
so, I put the two queries together in a third query, below:
Code:
SELECT qry_400m_OG_h.fname, qry_400m_OG_h.sname, qry_400m_OG_h.code, qry_400m_OG_h.sol, qry_400m_OG_h.cha, qry_400m_OG_h.ordh, qry_400m_OG_h.heat, qry_400m_OG_q.ordq, qry_400m_OG_q.markq, qry_400m_OG_h.order
FROM qry_400m_OG_h LEFT JOIN qry_400m_OG_q ON (qry_400m_OG_h.sol = qry_400m_OG_q.sol) AND (qry_400m_OG_h.code = qry_400m_OG_q.code) AND (qry_400m_OG_h.sname = qry_400m_OG_q.sname) AND (qry_400m_OG_h.fname = qry_400m_OG_q.fname)
ORDER BY qry_400m_OG_h.sol, qry_400m_OG_h.order;
this kind of works. where there is a performance in the 2nd round, this query returns accurate results. where there is no performance in the 2nd round, the field for ordq is left blank as expected, but the field for markq has #Error.
my understanding is, that this means that ACCESS is confused about what type of variable markq is.
so, I run the following SELECT query:
Code:
SELECT qry_400m_OG_q.markq, VarType([markq]) AS test
FROM qry_400m_OG_q;
which leaves no doubt that markq is a type 8, a string. which is exactly what I expect it to be.
I would very much appreciate some clue as to what I'm doing wrong?
many thanks.