[AccessD] Joining Queries via SQL rather than have a query stored in Access.

Collins, Darryl Darryl.Collins at anz.com
Wed Jan 20 17:03:01 CST 2010


Hi Folks.

I hope the subject line makes sense.  I will try to explain what I am
trying to do.

I have one simple query that I use to produce a RS to use in another
query
'---------------
SELECT lngDocRegID, pk_strDocId, fk_lngScheduleID
FROM ITPMO_tblDocReg_Main
WHERE fk_lngScheduleID Is Not Null;
'--------------
As Query "qry_Exception_MissingDocRegSub1"

Then in "qry_Exception_MissingFromDocReg" I have this:
'-------------
SELECT 'Stuff'
FROM ITPMO_tblSchedule INNER JOIN (qry_Exception_MissingDocRegSub1 ...
Ra ra ra  ..
'-------------

Now this works fine etc, but I was hoping to code the whole thing in
SQL, rather than having to have a query stored in Access and referencing
"qry_Exception_MissingDocRegSub1" in the second query.

I keep thinking that I can use UNION or similar to do this, but my brain
is not firing well today at all.

1: I hope that makes sense...
2: Anyone got any pointers on how to code that in SQL?

Regards
Darryl.

"This e-mail and any attachments to it (the "Communication") is, unless otherwise stated, confidential,  may contain copyright material and is for the use only of the intended recipient. If you receive the Communication in error, please notify the sender immediately by return e-mail, delete the Communication and the return e-mail, and do not read, copy, retransmit or otherwise deal with it. Any views expressed in the Communication are those of the individual sender only, unless expressly stated to be those of Australia and New Zealand Banking Group Limited ABN 11 005 357 522, or any of its related entities including ANZ National Bank Limited (together "ANZ"). ANZ does not accept liability in connection with the integrity of or errors in the Communication, computer virus, data corruption, interference or delay arising from or in respect of the Communication."




More information about the AccessD mailing list