Requête Windev 16 & AS/400

Tout ce qui concerne la version 11 & plus récentes de windev

**Windev est une marque déposée de Pcsoft**

Requête Windev 16 & AS/400

Messagepar Avenger22 » Jeu Avr 07, 2011 10:36 am

Bonjour à tous, j'essaye d'utiliser la requête suivante sous Windev :

Code: Tout sélectionner
WITH
tree(Compose,
Process_Cpse,
Composant,
Process_Cpsa,
Fictif,
ST,
Zone_Prod,
Secteur,
Qte_Lien,
Qte_Lien_Cum,
Delai_Dispo_Cpse,
Delai_Appel_Cpsa,
Delai_Lien,
Delai_Lien_Cum,
Qte_Min_Cpse,
Qte_Mult_Cpse,
Niveau,
Compose_Origine,
Process_Cpse_Origine,
Cle_de_Tri) AS (SELECT CAST(x1.Barefa AS CHAR(35)),
CAST(x1.Baprss AS CHAR(15)),
CAST(x1.Bbrefa AS CHAR(35)),
CAST(x1.Bbprss AS CHAR(15)),
CAST(x1.Bblifi AS CHAR(1)),
CAST(x2.AASSTT AS CHAR(1)),
CAST(x2.ACODFO AS CHAR(10)),
CAST(x2.AAGEST AS CHAR(10)),
CAST(x1.Bbqte AS DEC(9, 3)),
CAST(x1.Bbqte AS DEC(9, 3)),
CAST(x2.AADEDC AS DEC(6)),
CAST(x2.AADEAC AS DEC(6)),
CAST(x2.AADEDC + x2.AADEAC AS DEC(6)) AS Delai_Lien,
CAST(x2.AADEDC + x2.AADEAC AS DEC(6)),
CAST(x2.AAQMIN AS DEC(9, 0)),
CAST(x2.AAQMUL AS DEC(9, 0)),
CAST(1 AS INTEGER),
CAST(x1.Barefa AS CHAR(35)),
CAST(x1.Baprss AS CHAR(15)),
CAST(x1.Barefa CONCAT x1.Bbrefa AS VARCHAR(1100))
FROM VSFICBU9.Nomencb x1
INNER JOIN VSFICBU9.Nomenca x2
ON x2.AAREFA = x1.Barefa
AND x2.AAPRSS = x1.Baprss
WHERE x1.Barefa = '041-14672-990' AND x1.Baprss =1
UNION ALL
SELECT CAST(y1.Barefa AS CHAR(35)),
CAST(y1.Baprss AS CHAR(15)),
CAST(y1.Bbrefa AS CHAR(35)),
CAST(y1.Bbprss AS CHAR(15)),
CAST(y1.Bblifi AS CHAR(1)),
CAST(y2.AASSTT AS CHAR(1)),
CAST(y2.ACODFO AS CHAR(10)),
CAST(y2.AAGEST AS CHAR(10)),
CAST(y1.Bbqte AS DEC(9, 3)),
CAST(t.Qte_Lien * y1.Bbqte AS DEC(9, 3)),
CAST(y2.AADEDC AS DEC(6)),
CAST(y2.AADEAC AS DEC(6)),
CAST(y2.AADEDC + y2.AADEAC AS DEC(6)) AS Delai_Lien,
CAST(t.Delai_Lien_Cum + y2.AADEDC + y2.AADEAC AS DEC(6)),
CAST(y2.AAQMIN AS DEC(9, 0)),
CAST(y2.AAQMUL AS DEC(9, 0)),
CAST(t.Niveau + 1 AS INTEGER),
CAST(t.Compose_Origine AS CHAR(35)),
CAST(t.Process_Cpse_Origine AS CHAR(15)),
CAST(t.Cle_de_Tri CONCAT y1.Bbrefa AS VARCHAR(1100))
FROM VSFICBU9.Nomencb y1
INNER JOIN VSFICBU9.Nomenca y2
ON y2.AAREFA = y1.Barefa
AND y2.AAPRSS = y1.Baprss
INNER JOIN tree t
ON t.Composant = y1.Barefa
AND t.Process_Cpsa = y1.Baprss
WHERE t.Niveau < 30)
SELECT CAST (REPLACE(SPACE(Niveau), ' ', '|     ') CONCAT a.Composant
AS CHAR(300)) AS Nomenclature,
CAST(b.A07008 AS CHAR(35)) AS Libelle,
CAST(b.A0CNUS AS CHAR(10)) AS Unite,
CASE WHEN a.Fictif = '1' THEN cast('Fictif' AS char(6))
ELSE cast(' ' AS char(6)) END AS Fictif,
CASE WHEN a.ST = '1' THEN cast('S/T' AS char(6))
ELSE cast(' ' AS char(6)) END AS Fictif,
CAST(a.Zone_Prod AS CHAR(10)) AS Zone_Prod,
CAST(a.Secteur AS CHAR(10)) AS Secteur,
CAST(a.Qte_Lien AS DEC(9, 3)) AS Qte_Lien,
CAST(a.Qte_Lien_Cum AS DEC(9, 3)) AS Qte_Lien_Cum,
CAST(a.Qte_Min_Cpse AS DEC(9, 0)) AS Qte_Min_Cpse,
CAST(a.Qte_Mult_Cpse AS DEC(9, 0)) AS Qte_Mult_Cpse,
CAST(a.Delai_Dispo_Cpse AS DEC(6)) AS Delai_Dispo_Cpse,
CAST(a.Delai_Appel_Cpsa AS DEC(6)) AS Delai_Appel_Cpsa,
CAST(a.Delai_Lien AS DEC(6)) AS Delai_Lien,
CAST(a.Delai_Lien_Cum AS DEC(6)) AS Delai_Lien_Cum
FROM tree a
LEFT JOIN GALFV45BU9.Ka0artp b
ON b.A0ARTI = a.Composant
ORDER BY a.Cle_de_Tri


Cette requête fonctionne parfaitement sous SQL Editor.
Lorsque je l'intégre à Windev cela me dit tout d'abord : "Nom d'objet introuvable ou inconnu NOMENCB"
J'ai supprimer la librairie "VSFICBU9." précédement chacun des fichier et je suis arrivé au message suivant : http://img844.imageshack.us/f/sansre2.jpg/

Je me retrouve bloqué sans savoir ou chercher :(
Merci.
Avenger22
Membre
 
Messages: 50
Inscription: Mar Déc 09, 2008 2:01 pm

Retourner vers Forum windev 11 & plus récentes

 


  • Articles en relation
    Réponses
    Vus
    Dernier message

Qui est en ligne

Utilisateurs parcourant ce forum: Aucun utilisateur enregistré et 1 invité

cron