Query keeps giving error Access '13 -
i have query , isnt working correctly, knowledge says should be!
erd:
table 'meetingen':
table 'patienten':
the query have:
with result running:
so, strange thing here is; datum(date) between 5/1/2015 , 5/31/2015 should give persons table 'meetingen' date in may. result is, 'adres', 'postcode' , 'patientnr' 'patienten'. tryed everything... sees it?
edit made 1 stupid mistake, m.patientnr = m.patientnr, changed p.patientnr = m.patientnr witch gives following error:
between 5/1/2015 , 5/31/2015 should give persons table 'meetingen' date in may
that appears case in results. of dates either 5/1/2015
or 5/30/2015
, in selected range.
but result is, 'adres', 'postcode' , 'patientnr' 'patienten'.
yes, because columns on table. else expect them come from? if columns existed on both tables query result in error indicating couldn't determine column referring to. since columns on 1 table, query can discern show , shows results table.
also, note:
where m.patientnr = m.patientnr
this condition always true. did mean instead?
where m.patientnr = p.patientnr
you may want investigate join
syntax make table joins more explicit, rather doing in where
clause. separating joins filters makes intent more clear , errors easier find.
Comments
Post a Comment