Code: Select all
OCONN_RS.Open "SELECT AT_4, AGENZIA_4, AGENZIA_CENTRO, REGION, MERCATO_DISTRIB, ZONA FROM TGERARCHIA WHERE TIPO_UO_1='21' AND DES_STATO_PTF='ATTIVO' AND DENDVAL='" & Format(DtaInizio, "mm/dd/yyyy") & "' ORDER BY AGENZIA_4", GAF_CONN, adOpenForwardOnly, adLockReadOnly
Is possible to integrate the sql to match AGENZIA_4 with AGENZIA_4x and return the value of NUMBS...
I think is possible with Join statement but dont know the sintiax...