Cursor (IBM-Mainframe – VRX)
- Dieses Thema hat 2 Antworten und 1 Teilnehmer, und wurde zuletzt aktualisiert vor 17 Jahre, 2 Monaten von
Anonym.
-
AuthorPosts
-
21. Juli 2006 um 6:48 Uhr #2704
AnonymInaktivLiebe DB2-Gemeinschaft,
hier ist mein "Problem", welches, so glaube ich, keines ist, weil es eigentlich garnicht funktionieren kann. Aber vielleicht weiß die Leserschaft doch eine
Antwort. Der Cursor läuft auf einen DB2-Fehler weil die FKG_NR_BLZ numerisch gepackt ist und die BLZ ein Alphafeld ist.
DECLARE EINGABE-CURSOR CURSOR
FOR
SELECT A9.FKG_NR_BLZ
,A2.V314006
,A0.V114001
FROM FKG A9
,GBTBB030 A0
,GBTBB032 A2
WHERE A9.FKG_NR_BLZ = A0.BLZ
AND A9.FKG_NR_BLZ = A2.BLZ
Gibt es eine Lösung ohne große Umprogrammierung?
Grüße aus Cuxhaven
Rainer
21. Juli 2006 um 8:18 Uhr #3101
AnonymInaktivhmmm, ein
WHERE Â A9.FKG_NR_BLZ Â = Â CAST(A0.BLZ as DECIMAL(x,y))
  AND  A9.FKG_NR_BLZ  =  CAST(A2.BLZ as DECIMAL(x,y))( bzw … AS INTEGER, wenn FKG_NR_BLZ binär gepackt ist )
sollte funktionieren.
( aus Performance-Gesichtspunken nicht unbedingt optimal )je nach Grösse der einzelnen Tabellen und exaktem Inhalt der Spalten sowie vorhandenen Indices könnte auch ein nested table funktionieren:
21. Juli 2006 um 8:21 Uhr #3384
AnonymInaktivSELECT Â A9.FKG_NR_BLZ
  ,A2.V314006
  ,A0.V114001
  FROM  Â
( SE LECT FKG_NR_BLZ, CHAR( FKG_NR_BLZ ) AS JOINFELD FROM FKG ) Â A9
INNER JOIN GBTBB030 A0
 ON A9.JOINFELD  =  A0.BLZ
INNER JOIN GBTBB032 A2
 ON  A9.JOINFELD  =  A2.BLZ*faszinierend* wenn ich das untere SE LECT als ein Wort schreibe, bekommt das Forum einen "internen Verarbeitungsfehler". Also das eine Blanc bitte wegdenken
-
AuthorPosts
You must be logged in to reply to this topic.