sql - Query with multiple INNER JOINS, difficulties in avoiding duplicates -



sql - Query with multiple INNER JOINS, difficulties in avoiding duplicates -

i have access bd main table ('principale') having many-to-many connection ('tabregisti'), bring together table between them ('tabregisti_unione'). i've form 'principale' there's search button that, after user click, creates query listbox in form. query i'm using following:

select principale.id, principale.codicedvd, principale.cofanetto, principale.titolodvd, tabregisti.nomeregista, tabregisti.cognomeregista, tabcategoria.categoria, principale.durata, principale.attoriprincipali, principale.produzione, principale.annodvd, principale.annofilm, principale.dataacq, principale.ubicazione tabregisti inner bring together (tabcategoria inner bring together ((principale inner bring together tabubicazione on principale.ubicazione = tabubicazione.ubicazione) inner bring together tabregisti_unione on principale.id = tabregisti_unione.idrifprincipale) on tabcategoria.categorieid = principale.categorieid) on tabregisti.idregista = tabregisti_unione.idregistaunione (((tabregisti.nomeregista) "*anc*") , ((tabregisti.cognomeregista) "*")) order principale.codicedvd;

i'm using query, right syntax, in vba (the clause showed example, of course). works fine leaves duplicates of main table's records. i've tried insert clause distinct and, after, clause distinctrow, nil chanced (duplicates still there). otherwise, utilize of clause grouping (i.e. 'group principale.codicedvd' before clause order by) gives error. suggstions?

hope explanation of problem clear plenty (i'm not english language motherlanguage, indulgents).

distinct show rows distinct values in selection fields. selected fields row must not identical. need remove select fields 1 time don't need , generate row don't want see.

sql vba ms-access-2007

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -