Query keeps giving error Access '13 -


i have query , isnt working correctly, knowledge says should be!

erd: enter image description here

table 'meetingen': enter image description here

table 'patienten': enter image description here

the query have:

enter image description here

with result running: enter image description here

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: enter image description here

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

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -