MySql-Abfrage geht nach Update nicht mehr

Hi Bernd,

ich habe deinen letzten Code eingefügt.

Eine neue Fehlermeldung ;) Ich hoffe wir nähern uns langsam und ich muss dich nicht weiter nerven :)

Hier die Meldung:

Unknown column 'x.source_node_id' in 'on clause'
 
Hallo Bacaaardi,

) y ON (x.source_node_id=y.source_node_id)
kommt im Quellcode nur einmal vor.

Ersetzte es bitte durch x.Komponente

Code:
SELECT    Projekt,pkey AS Schlüssel,reporter AS Autor,assignee AS Bearbeiter,
    created AS Erstellt,updated AS Aktualisiert,Vorgangstyp,Lösung,Status,
    Priorität,Komponente,betrifft_Version, Lösungsversion  
FROM    (SELECT *
        FROM jiraissue k
        LEFT OUTER JOIN (SELECT id as ProID,pname AS Projekt FROM project) l on (k.project= l.ProID)
        LEFT OUTER JOIN (SELECT id as IssID, pname AS Vorgangstyp FROM issuetype) m on (k.issuetype= m.IssID)
        LEFT OUTER JOIN (SELECT id as ResID, pname AS Lösung FROM resolution) o on (k.resolution= o.ResID)
        LEFT OUTER JOIN (SELECT id as StaID, pname AS Status FROM issuestatus) u on (k.issuestatus= u.StaID)
        LEFT OUTER JOIN (SELECT id as PriID, pname AS Priorität FROM priority) n on (k.priority= n.PriID)
        ) yy
LEFT OUTER JOIN
    (SELECT * FROM
        (SELECT a.source_node_id AS Komponente, MAX(b.cname)
        FROM nodeassociation a 
        LEFT OUTER JOIN component b ON (a.sink_node_id = b.id)
        WHERE  association_type = 'IssueComponent'
        GROUP BY a.source_node_id
        ) x
    LEFT OUTER JOIN    
            (SELECT a.source_node_id AS Lösungsversion, MAX( c.vname)
            FROM nodeassociation a LEFT OUTER JOIN projectversion c ON (a.sink_node_id = c.id)
            WHERE  association_type = 'IssueFixversion'
            GROUP BY a.source_node_id
            ) y    ON (x.Komponente=y.source_node_id)
    LEFT OUTER JOIN 
            (SELECT a.source_node_id AS betrifft_Version, MAX(c.vname)
            FROM nodeassociation a LEFT OUTER JOIN projectversion c ON (a.sink_node_id = c.id)
            WHERE  association_type = 'Issueversion'
            GROUP BY a.source_node_id
            ) z ON (x.Komponente=z.source_node_id)
    ) xx ON (xx.Komponente=yy.ProID)
WHERE Projekt ='Test '
ORDER BY pkey DESC

Ggf. sind noch weitere "?.source_node_id" in den "ON"-Zeilen zu ersetzten.
 
Also habe es ersetzt:

Sieht jetzt so aus:

Code:
SELECT    Projekt,pkey AS Schlüssel,reporter AS Autor,assignee AS Bearbeiter,
    created AS Erstellt,updated AS Aktualisiert,Vorgangstyp,Lösung,Status,
    Priorität,Komponente,betrifft_Version, Lösungsversion  
FROM    (SELECT *
        FROM jiraissue k
        LEFT OUTER JOIN (SELECT id as ProID,pname AS Projekt FROM project) l on (k.project= l.ProID)
        LEFT OUTER JOIN (SELECT id as IssID, pname AS Vorgangstyp FROM issuetype) m on (k.issuetype= m.IssID)
        LEFT OUTER JOIN (SELECT id as ResID, pname AS Lösung FROM resolution) o on (k.resolution= o.ResID)
        LEFT OUTER JOIN (SELECT id as StaID, pname AS Status FROM issuestatus) u on (k.issuestatus= u.StaID)
        LEFT OUTER JOIN (SELECT id as PriID, pname AS Priorität FROM priority) n on (k.priority= n.PriID)
        ) yy
LEFT OUTER JOIN
    (SELECT * FROM
        (SELECT a.source_node_id AS Komponente, MAX(b.cname)
        FROM nodeassociation a 
        LEFT OUTER JOIN component b ON (a.sink_node_id = b.id)
        WHERE  association_type = 'IssueComponent'
        GROUP BY a.source_node_id
        ) x
    LEFT OUTER JOIN    
            (SELECT a.source_node_id AS Lösungsversion, MAX( c.vname)
            FROM nodeassociation a LEFT OUTER JOIN projectversion c ON (a.sink_node_id = c.id)
            WHERE  association_type = 'IssueFixversion'
            GROUP BY a.source_node_id
            ) y    ON (x.Komponente=y.source_node_id)
    LEFT OUTER JOIN 
            (SELECT a.source_node_id AS betrifft_Version, MAX(c.vname)
            FROM nodeassociation a LEFT OUTER JOIN projectversion c ON (a.sink_node_id = c.id)
            WHERE  association_type = 'Issueversion'
            GROUP BY a.source_node_id
            ) z ON (x.Komponente=z.source_node_id)
    ) xx ON (xx.Komponente=yy.ProID)
WHERE Projekt ='infoRate'
ORDER BY pkey DESC

Du hast Recht mit deiner Vermutung

Folgende Fehlermeldung:

Unknown column 'y.source_node_id' in 'on clause'

Außerdem gibt es noch eine: z.source_node_id

Muss da auch was beachtet werden?
 
Hallo Bernd,

es hat geklappt
Hab alles nochmal angepasst, sihe Code:

Code:
SELECT    Projekt,pkey AS Schlüssel,reporter AS Autor,assignee AS Bearbeiter,
    created AS Erstellt,updated AS Aktualisiert,Vorgangstyp,Lösung,Status,
    Priorität,Komponente,betrifft_Version, Lösungsversion
FROM    (SELECT *
        FROM jiraissue k
        LEFT OUTER JOIN (SELECT id as ProID,pname AS Projekt FROM project) l on (k.project= l.ProID)
        LEFT OUTER JOIN (SELECT id as IssID, pname AS Vorgangstyp FROM issuetype) m on (k.issuetype= m.IssID)
        LEFT OUTER JOIN (SELECT id as ResID, pname AS Lösung FROM resolution) o on (k.resolution= o.ResID)
        LEFT OUTER JOIN (SELECT id as StaID, pname AS Status FROM issuestatus) u on (k.issuestatus= u.StaID)
        LEFT OUTER JOIN (SELECT id as PriID, pname AS Priorität FROM priority) n on (k.priority= n.PriID)
        ) yy
LEFT OUTER JOIN
    (SELECT * FROM
        (SELECT a.source_node_id AS Komponente, MAX(b.cname)
        FROM nodeassociation a
        LEFT OUTER JOIN component b ON (a.sink_node_id = b.id)
        WHERE  association_type = 'IssueComponent'
        GROUP BY a.source_node_id
        ) x
    LEFT OUTER JOIN    
            (SELECT a.source_node_id AS Lösungsversion, MAX( c.vname)
            FROM nodeassociation a LEFT OUTER JOIN projectversion c ON (a.sink_node_id = c.id)
            WHERE  association_type = 'IssueFixversion'
            GROUP BY a.source_node_id
            ) y    ON (x.Komponente=y.Lösungsversion)
    LEFT OUTER JOIN
            (SELECT a.source_node_id AS betrifft_Version, MAX(c.vname)
            FROM nodeassociation a LEFT OUTER JOIN projectversion c ON (a.sink_node_id = c.id)
            WHERE  association_type = 'Issueversion'
            GROUP BY a.source_node_id
            ) z ON (x.Komponente=z.betrifft_Version)
    ) xx ON (xx.Komponente=yy.ProID)
WHERE Projekt ='Test'
ORDER BY pkey DESC


Funktioniert prima. Vielen vielen vielen vielen vielen vielen Dank

Muss es noch leicht anpassen, aber mit dieser Abfrage habe ich ein Ergebnis bekommen...
Vielleicht hätte ich morgen noch eine kleine Frage an dich :)
 
Zurück