Etxezarreta
Member
- Local time
- Today, 16:03
- Joined
- Apr 13, 2020
- Messages
- 175
Ok, I just learnt how to create a pass trough query.
To make sure I have understood:
- considering the fact that the string "strAllCriteria" is the result of list boxes
- considering the fact that all the other fields come from the SqlAzure tables
- considering the fact that the table finally poupulates "DSP_RDV_PREPA_t_transi_ChoixPraticiensAppels_OuiNon" is local (on top of being way too long, this is true..) and the other ones are in SqlAzure
your recomandation is:
1. to run this query as pass-trough query
2. to run the querydefs called "re_DatesDerniersRdvParContact" also as a pass-through one (used in the first one)
Thank you for your feed-back.
Etxe
To make sure I have understood:
- considering the fact that the string "strAllCriteria" is the result of list boxes
- considering the fact that all the other fields come from the SqlAzure tables
- considering the fact that the table finally poupulates "DSP_RDV_PREPA_t_transi_ChoixPraticiensAppels_OuiNon" is local (on top of being way too long, this is true..) and the other ones are in SqlAzure
your recomandation is:
1. to run this query as pass-trough query
Code:
str_SQL_finale = "INSERT INTO DSP_RDV_PREPA_t_transi_ChoixPraticiensAppels_OuiNon (ID_Contact, Integrer_ListeAppels, Nom_contact, Prenom_contact, Date_dernier_rdv, Nom_structure, Fonction, Specialite, Profession, Departement, Secteur, Case_du_plan, Adresse_1, Ville, Secretariat_telephonique, Tel1, Courriel )" _
& " SELECT Contacts_t_ListeContacts.ID_Contact, Contacts_t_ListeContacts.Integrer_ListeAppels, Contacts_t_ListeContacts.Nom_contact, Contacts_t_ListeContacts.Prenom_contact, re_DatesDerniersRdvParContact.Date_dernier_rdv, Contacts_t_ListeContacts.Nom_structure, Contacts_t_ListeContacts.Fonction, Contacts_t_ListeContacts.FK_Specialite, Contacts_t_ListeContacts.FK_Profession, Contacts_t_ListeContacts.Departement, Contacts_t_ListeContacts.Secteur, Contacts_t_ListeContacts.Case_du_plan, Contacts_t_ListeContacts.Adresse_1, Contacts_t_ListeContacts.Ville, Contacts_t_ListeContacts.Secretariat_telephonique, Contacts_t_ListeContacts.Tel1, Contacts_t_ListeContacts.Courriel" _
& " FROM Contacts_t_ListeContacts LEFT JOIN re_DatesDerniersRdvParContact ON Contacts_t_ListeContacts.ID_Contact = re_DatesDerniersRdvParContact.FK_contact" _
& " WHERE " & strAllCriteria & " "
Debug.Print (str_SQL_finale)
objConnection.Execute (str_SQL_finale)
2. to run the querydefs called "re_DatesDerniersRdvParContact" also as a pass-through one (used in the first one)
Thank you for your feed-back.
Etxe