Questo è il codice che stavo provando io che teoriacamente mi sembra funzionante ma in pratica mi prende sempre e solo 3 record:
codice:
strq = "select * from (select * from casa where abilitato='S' and lmgiugno='S' order by areadiriferimento, posizione, nome)t1"
strq = strq & " UNION select * from (select * from casa where abilitato='S' and lmluglio='S' order by areadiriferimento, posizione, nome)t2"
strq = strq & " UNION select * from (select * from casa where abilitato='S' and lmagosto='S' order by areadiriferimento, posizione, nome)t3"
strq = strq & " UNION select * from (select * from casa where abilitato='S' and lmsettembre='S' order by areadiriferimento, posizione, nome)t4"