lunedì 26 settembre 2016

Microsoft Access Multiple Left Joins

Nel caso che dobbiamo eseguire un comando sql in Ado.Net oppure in Microsoft Access, riguardante una select in cui è presente tre o più left join, il tradizionale comando left join di Sql genera un errore.
In Microsoft Access, per utilizzare più left join bisogna utilizzare le parentesi tonde, qui di seguito un esempio di codice.

Select taba.Campo, tabb.campo2, tabc.campo3, tabd.campo4 from
(((tabellaA taba left join tabellaB  tabb on taba.id = tabb.id) left join tabellaC tabc on taba.id = tabc.id) left join tabellaD tabd on taba.id = tabd.id)

Nessun commento: