La requete suivante fonctionne avec l'émulateur mais pas en déploiement sous Android (Requete Count avec option ISNULL)
Quelqu'un sait-il pourquoi ?
SELECT ent_commande.IDClient_log AS IDClient_log, ent_commande.IDAgence AS IDAgence, ent_commande.Statut AS Statut, ent_client_log.Nom AS Nom, ent_client_log.IDPlateforme AS IDPlateforme, ent_commande.IDType AS IDType, ISNULL( ent_type.Type , 'Sans Récipient') AS Type, COUNT(*) AS Total_BP FROM ent_client_log INNER JOIN ( ent_type RIGHT OUTER JOIN ent_commande ON ent_type.IDType = ent_commande.IDType ) ON ent_client_log.IDClient_log = ent_commande.IDClient_log WHERE ( ent_commande.Statut = 1 AND ent_commande.IDClient_log = {ParamIDClient_log} AND ent_commande.IDAgence = {ParamIDAgence} AND ent_client_log.IDPlateforme = {ParamIDPlateforme} AND ent_commande.IDType IN ({ParamIDType_Recipient}) ) GROUP BY ent_commande.IDClient_log, ent_commande.IDAgence, ent_commande.Statut, ent_client_log.Nom, ent_client_log.IDPlateforme, ent_commande.IDType, ISNULL( ent_type.Type , 'Sans Récipient')
============================================= Voici le rapport d'erreur obtenu
Initialisation de la requête impossible L'utilisation de fonctions agrégats avec d'autres rubriques ou fonctions non agrégat n'est pas autorisée sans l'utilisation d'une clause GROUP BY. Toutes les fonctions non agrégat doivent figurer dans la clause GROUP BY |