sql - An Access problem: Not getting required output while building a report -


i have created report in access , have written query fetching records multiple tables follows:

select buildingdetails.*, contractors.item, actiondetails.actiontype contractors  inner join (buildingdetails      inner join (actiondetails          inner join dormdata on actiondetails.actionid = dormdata.actionid)      on buildingdetails.buildingid = dormdata.buildingid)  on contractors.id = dormdata.itemid; 

now want actiontype=repair or actionid=1 retrieved query. have 2 actontype "repair" , "replace".

i suspect need filter using actiontype = 'repair' (i further guess actionid autonumber , have row {actionid = 1, actiontype = 'repair'} chance... maybe extrapolating far :)

i'm surprised @david steele's answer works in access (ace, jet, whatever) because he's removed parentheses join clauses (however if -- suggesting linked table -- should "accept" answer). resist 'neatening them up' on clauses close table names:

select buildingdetails.*, contractors.item, actiondetails.actiontype   ((dormdata           inner join contractors              on contractors.id = dormdata.itemid)          inner join buildingdetails              on buildingdetails.buildingid = dormdata.buildingid)          inner join actiondetails             on actiondetails.actionid = dormdata.actionid  actiondetails.actiontype = 'repair'; 

Comments

Popular posts from this blog

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -