Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Not applicable

Problème urgent SQL

Bonjour la communauté

Je suis vraiment tres bizarre ces derniers jours. J'ecris mes requetes, elles fonctionnent bien sous TOD FOR ORACLE. Mais quand je les importe dans Qlikview, c'est la vrai ***. Ca ne marche jamais.

Exemple:

SELECT c.nomredclass libpere, c1.nomredclass libfils1,
c2.nomredclass libfils2, SUM (e.cpt_mtdb)
FROM comclass c

LEFT JOIN comclass c1
ON c1.cdos = c.cdos AND c1.numpere = c.codclass

LEFT JOIN comclass c2
ON c2.cdos = c1.cdos AND c2.numpere = c1.codclass

LEFT JOIN deltaerp.comecrgen e
ON e.cdos = c2.cdos AND SUBSTR (e.numcpt, 0, 3) = c2.codclass /* filtre sur les dates : */

LEFT JOIN deltaerp.comdos d
ON d.cdos = c2.cdos AND d.nred = 'BGFI' AND e.datcpt between d.ddex and d.dfex

WHERE c.cdos = '01'
AND c.numpere = 'MAIN'
AND c.ctab = '20105'
AND c.codclass = '2'
GROUP BY c.nomredclass,
c1.nomredclass,
c2.nomredclass
ORDER BY c.nomredclass,
c1.nomredclass,
c2.nomredclass

Cette requete me donne le bon resultat sous TOAD mais sous Qlikview, elle me retourne des erreurs du genre: Voivi l'erreur:

Champ non trouvé - <Classe>
SQL SELECT c.nomredclass as Classe, c1.nomredclass as Sous_Classe1,
c2.nomredclass as Sous_Classe2, SUM (e.cpt_mtdb) as mount
FROM comclass c

LEFT JOIN comclass c1
ON c1.cdos = c.cdos AND c1.numpere = c.codclass

LEFT JOIN comclass c2
ON c2.cdos = c1.cdos AND c2.numpere = c1.codclass

LEFT JOIN deltaerp.comecrgen e
ON e.cdos = c2.cdos AND SUBSTR (e.numcpt, 0, 3) = c2.codclass

LEFT JOIN deltaerp.comdos d
ON d.cdos = c2.cdos AND d.nred = 'BGFI' AND e.datcpt between d.ddex and d.dfex

WHERE c.cdos = '01'
AND c.numpere = 'MAIN'
AND c.ctab = '20105'
AND c.codclass = '2'
GROUP BY c.nomredclass,
c1.nomredclass,
c2.nomredclass
ORDER BY c.nomredclass,
c1.nomredclass,
c2.nomredclass

Merci pour votre réaction

4 Replies
Not applicable

Problème urgent SQL

Hi,

Can you please post in English?

-Haneesh

Not applicable

Re. :Re: Problème urgent SQL

Hello community

I am really very strange in recent days. I write my applications, they work well under DOT FOR ORACLE. But when I import them into Qlikview is the true difficulty. It never works.

SELECT c.nomredclass libpere, c1.nomredclass libfils1,
c2.nomredclass libfils2, SUM (e.cpt_mtdb)
FROM comclass c

LEFT JOIN comclass c1
ON c1.cdos = c.cdos AND c1.numpere = c.codclass

LEFT JOIN comclass c2
ON c2.cdos = c1.cdos AND c2.numpere = c1.codclass

LEFT JOIN deltaerp.comecrgen e
ON e.cdos = c2.cdos AND SUBSTR (e.numcpt, 0, 3) = c2.codclass /* filtre sur les dates : */

LEFT JOIN deltaerp.comdos d
ON d.cdos = c2.cdos AND d.nred = 'BGFI' AND e.datcpt between d.ddex and d.dfex

WHERE c.cdos = '01'
AND c.numpere = 'MAIN'
AND c.ctab = '20105'
AND c.codclass = '2'
GROUP BY c.nomredclass,
c1.nomredclass,
c2.nomredclass
ORDER BY c.nomredclass,
c1.nomredclass,
c2.nomredclass

This query gives me good result in TOAD but under Qlikview, she returns errors like: voive the error:

Champ non trouvé - <Classe>
SQL SELECT c.nomredclass as Classe, c1.nomredclass as Sous_Classe1,
c2.nomredclass as Sous_Classe2, SUM (e.cpt_mtdb) as mount
FROM comclass c

LEFT JOIN comclass c1
ON c1.cdos = c.cdos AND c1.numpere = c.codclass

LEFT JOIN comclass c2
ON c2.cdos = c1.cdos AND c2.numpere = c1.codclass

LEFT JOIN deltaerp.comecrgen e
ON e.cdos = c2.cdos AND SUBSTR (e.numcpt, 0, 3) = c2.codclass

LEFT JOIN deltaerp.comdos d
ON d.cdos = c2.cdos AND d.nred = 'BGFI' AND e.datcpt between d.ddex and d.dfex

WHERE c.cdos = '01'
AND c.numpere = 'MAIN'
AND c.ctab = '20105'
AND c.codclass = '2'
GROUP BY c.nomredclass,
c1.nomredclass,
c2.nomredclass
ORDER BY c.nomredclass,
c1.nomredclass,
c2.nomredclass



llauses243
Contributor III

Re. :Re: Problème urgent SQL

Pls to look ...

Not applicable

Re. :Re: Re. :Re: Problème urgent SQL

The error message is the same. Always

Field not found - <Classe>

Thnks