Requête dificile

cs_othinakiway Messages postés 30 Date d'inscription lundi 7 avril 2008 Statut Membre Dernière intervention 10 juin 2009 - 4 juin 2009 à 21:37
cs_othinakiway Messages postés 30 Date d'inscription lundi 7 avril 2008 Statut Membre Dernière intervention 10 juin 2009 - 6 juin 2009 à 01:14
comment se fait il qu'une requête s'exécute correctement sur l'analyseur de requête et provoque une erreur de syntaxe quand on l'introduit dans une commande (OLeDBCommand) , sachant que je l'ai tester avec un rapport CRystal report et sa a marché aussi . Voila la requête miracle :
select BH.nomB, sum(nbr_effectif)-(select sum(nbr_effectif) from besoin_emploi BE,entreprise E, secteur S, branche B, métier M, province P, région R
where BE.RS=E.RS and E.codeP=P.codeP and P.codeR=R.codeR and BE.codem=M.codeM and M.codeB=B.codeB and B.codeS=S.codeS and S.codeS=@codeSec and R.codeR=@codeRégion and annee=@annee and trimestre in('T1','T2') group by B.nomB having B.nomB=BH.nomB) as total from besoin_emploi BE,entreprise E, secteur S, branche BH, métier M, province P, région R
where BE.RS=E.RS and E.codeP=P.codeP and P.codeR=R.codeR and BE.codem=M.codeM and M.codeB=BH.codeB and BH.codeS=S.codeS and S.codeS=@codeSec} and R.codeR=@codeRégion}
group by BH.nomB

3 réponses

cs_casy Messages postés 7741 Date d'inscription mercredi 1 septembre 2004 Statut Membre Dernière intervention 24 septembre 2014 40
4 juin 2009 à 21:48
select BH.nomB, sum(nbr_effectif)-(select sum(nbr_effectif) from
besoin_emploi BE,entreprise E, secteur S, branche B, métier M, province
P, région R
where BE.RS= E.RS and E.codeP=P.codeP and P.codeR=R.codeR
and BE.codem=M.codeM and M.codeB=B.codeB and B.codeS=S.codeS and
S.codeS=@codeSec and R.codeR=@codeRégion and annee=@annee and trimestre
in('T1','T2') group by B.nomB having B.nomB=BH.nomB) as total from
besoin_emploi BE,entreprise E, secteur S, branche BH, métier M,
province P, région R
where BE.RS=E.RS and E.codeP=P.codeP and
P.codeR=R.codeR and BE.codem=M.codeM and M.codeB=BH.codeB and
BH.codeS=S.codeS and S.codeS=@codeSec }
and R.codeR =@codeRégion}
group by BH.nomB



Ou sont les accolades ouvrantes correspondantes ????

---- Sevyc64  (alias Casy) ----<hr size="2" width="100%" /># LE PARTAGE EST NOTRE FORCE #    http://aide-office-vba.monforum.com/index.php
0
marvaneke Messages postés 7 Date d'inscription jeudi 4 juin 2009 Statut Membre Dernière intervention 7 juin 2009
4 juin 2009 à 21:52
C'est quoi le texte du message d'erreur ?
0
cs_othinakiway Messages postés 30 Date d'inscription lundi 7 avril 2008 Statut Membre Dernière intervention 10 juin 2009 2
6 juin 2009 à 01:14
salut,
merci les amis pour vos réponse, ms finalement la mm requête a marché sans la moindre modification..Puuf c vraiment étrange ... ms bon je crois que l'erreur provient d'autre chose !!... ms je ne sais quoi !!... en tt k je suis heureux que tt va pr le mieux
0
Rejoignez-nous