Monday 15 February 2010

Merge command DB2 AIX (Update ok, insert not ok) -


I'm currently making a difference with the merge command on AIX DB2 9.7. All that I want to achieve, writes a command that displays and updating a line with the primary key is already checked and if not, then insert the statement. I hope that merge can be used for the command.

If something exists, then update, if not exist, then the ARTANT

the updated statement works (I can see in my Todd) and of course in the database . Timestamp But the inclusion does not work. No syntax error displayed, but no one has been inserted. Todd Show "Successfully Executed"

Any help is appreciated. The WHERE section shows the primary key of the table. In DSPTMCCP, Kenjah / DDefinition. Using kd (Anaraimandtiant, Selajiarpiarpimkeanajeaacel, Sel_keanajelac Dispitimseepi. Kenjajacaeldifiasn where Anar_maandiant = 5472 and Sel_gruppikekeananjiaacel = "_ Vibiac and SL_KENNZAHL = 104) as the KD1 (KD.NR_MANDANT = KD1.NR_MANDANT and KD.SL_GRUPPE_KENNZAHL = KD1.SL_GRUPPE_KENNZAHL and KD .SL_KENNZAHL = KD1.SL_KENNZAHL) when matched then update set BEZ_KENNZAHL_ABS = 'MEFGA', BEZ_KENNZAHL_REL = 'Aufgaben', BEZ_EINHEIT_ABS = '%', BEZ_EINHEIT_REL = '%', SL_MODIFIZIERUNG = 3, ANZ_NACHKOMMASTELLEN_ABS = 2, ANZ_NACHKOMMASTELLEN_REL = 2, KZ_QUALITAETSZIEL_ABS = "H", KZ_QUALITAETSZIEL_REL = "H", BEZ_ERMITTLUNGSFREQUENZ = 'Monatl K', BEZ_ERMITTLUNGSART = 'Automatic', BEZ_DATENLIEFERANT = 'Jiscfrfffelddetain, TXT_QUELLINFORMATION =' Jiscffelddetain, TXT_KNZ_BESCHREIBUNG = 'Ofgeben, Fak_aif_jiviiactiti = 1, Kejeac_acaielfsjiaroisi =' N ', Seluarjiaruarpeepeepikekeananjiaacel_oel = "Alg" , SL_KNAZHL_OL = 10, FAK_ARGNBNISUrL = 1, BEZ_EINHEIT_QUELLE = '%', FAK_UMRECHNUNG_QUELLE = 1, KZ_REF_OHNE_VORZEICHEN = 'N' when not matched then insert (NR_MANDANT, SL_GRUPPE_KENNZAHL, SL_KENNZAHL, SYS _dwh_tispi, Sl_modifiziarung, Uid_erfsung, Tispi_erfsung, Uid_anderung, Tispi_anderung, Bez_anheit_abis, Anj_nackommastellen_abis, Sl_gruppe_kentrghl_ref, Sl_kentrghl_ref, Kz_ref_ohne_vorjechen, Sl_ref_verdictung, Bez_kentrghl_abis, Bez_kentrghl_rel, Kz_harrcisumme, Kz_kwalitaitsjiel_abis, Kz_kwalitaitsjiel_rel, Bez_armittlungsfrecvenz, Bez_armittlungsrt, Iht_miniml, Iht_mksiml, Iht_miniml_rel, Iht_mksiml_rel, Bez_dtenliferant, Tst_kvellinfaormtion, DAT_ERFASSUNG_AB, DAT_ERFASSUNG_BIS, TXT_KNZ_BESCHREIBUNG, FAK_REF_GEWICHT, KZ_HILFSGROESSE, SL_GRUPPE_KENNZAHL_REL, SL_KENNZAHL_REL, FAK_ERGEBNIS_REL, BEZ_EINHEIT_QUELLE, FAK_UMRECHNUNG_QUELLE, BEZ_EINHEIT_REL, ANZ_NACHKOMMASTELLEN_REL) price (5472, '_VBH', '104', the current timestamp, 3, 'automate' current timestamp, automate ', The current timestamp,'% ', 2, empty, rick , 'N', Blank, 'Afghan', 'Afghan', 'N', 'H', 'H', 'Monetal', 'Automat', Blank, Blank, Blank, Zero, 'Jischffeldfeldt', '1 , 'N', 'lag', '10', 1, '%', 1, '%', 2); '1990, 2000', '31.12, 99 ',' Afghan ', 1.

The problem is resolved. Using the section, the target table next to it does not need to be empty, it has turned it into cesimi and now it works.

Such a thing as

  KN Eising as Kejriwal in DSPTMCCP (as 5472 AS NRMANDER, '_CASR' AS SL_PRPPPKKN.NJHL, 600 AS SL_KENJAHAL, CSIBM SSDMI1) As KD1On (KD.NR_MANDAT = KD1Nr_Mindt and KDSLLGRPPPKKNNAJLL = KD1Sl_GRUPPPLKNAJHL and KDSL_KNNAJHL = KD1S L_centnejaacel) when it was matched    

No comments:

Post a Comment