Thema: Delphi Insert into

Einzelnen Beitrag anzeigen

Walter Landwehr

Registriert seit: 28. Mär 2006
Ort: 32816 Schieder-Schwalenberg
384 Beiträge
 
Delphi 10.4 Sydney
 
#25

AW: Insert into

  Alt 1. Sep 2020, 11:01
Habe mal alle Indexe gelöscht.

Hier mal die Procedure:
Delphi-Quellcode:
SET TERM ^ ;

create or alter procedure TBL_RECHNUNGSPOSITIONEN_INS (
    RECHNUNGSPOSITIONENNR type of column TBL_RECHNUNGSPOSITIONEN.RECHNUNGSPOSITIONENNR,
    RECHNUNGNR type of column TBL_RECHNUNGSPOSITIONEN.RECHNUNGNR,
    PATIENTENNUMMER type of column TBL_RECHNUNGSPOSITIONEN.PATIENTENNUMMER,
    BEHANDLUNGSDATUM type of column TBL_RECHNUNGSPOSITIONEN.BEHANDLUNGSDATUM,
    MITARBEITERNUMMER type of column TBL_RECHNUNGSPOSITIONEN.MITARBEITERNUMMER,
    BEHANDLER type of column TBL_RECHNUNGSPOSITIONEN.BEHANDLER,
    GEBUEHNR type of column TBL_RECHNUNGSPOSITIONEN.GEBUEHNR,
    CODENR type of column TBL_RECHNUNGSPOSITIONEN.CODENR,
    SUCHWORT type of column TBL_RECHNUNGSPOSITIONEN.SUCHWORT,
    TEXT type of column TBL_RECHNUNGSPOSITIONEN.TEXT,
    GOAENR type of column TBL_RECHNUNGSPOSITIONEN.GOAENR,
    MENGE type of column TBL_RECHNUNGSPOSITIONEN.MENGE,
    FAKTOR type of column TBL_RECHNUNGSPOSITIONEN.FAKTOR,
    EINZELPREIS type of column TBL_RECHNUNGSPOSITIONEN.EINZELPREIS,
    STEUERCODE type of column TBL_RECHNUNGSPOSITIONEN.STEUERCODE,
    STEUERBETRAG type of column TBL_RECHNUNGSPOSITIONEN.STEUERBETRAG,
    STEUERSATZ type of column TBL_RECHNUNGSPOSITIONEN.STEUERSATZ,
    GESAMTBETRAG type of column TBL_RECHNUNGSPOSITIONEN.GESAMTBETRAG,
    ANLAGE type of column TBL_RECHNUNGSPOSITIONEN.ANLAGE,
    ANLAGEBENUTZER type of column TBL_RECHNUNGSPOSITIONEN.ANLAGEBENUTZER,
    AENDERUNG type of column TBL_RECHNUNGSPOSITIONEN.AENDERUNG,
    AENDERUNGBENUTZER type of column TBL_RECHNUNGSPOSITIONEN.AENDERUNGBENUTZER,
    MERKER type of column TBL_RECHNUNGSPOSITIONEN.MERKER,
    TIERENR type of column TBL_RECHNUNGSPOSITIONEN.TIERENR,
    KATEGORIE type of column TBL_RECHNUNGSPOSITIONEN.KATEGORIE,
    SPLITTING type of column TBL_RECHNUNGSPOSITIONEN.SPLITTING,
    MEDIKAMENT type of column TBL_RECHNUNGSPOSITIONEN.MEDIKAMENT,
    GEBUEHRENNR type of column TBL_RECHNUNGSPOSITIONEN.GEBUEHRENNR,
    TYP type of column TBL_RECHNUNGSPOSITIONEN.TYP,
    LKZ type of column TBL_RECHNUNGSPOSITIONEN.LKZ,
    BEHANDLERNUMMER type of column TBL_RECHNUNGSPOSITIONEN.BEHANDLERNUMMER,
    GEHOERTZU type of column TBL_RECHNUNGSPOSITIONEN.GEHOERTZU,
    TARIF type of column TBL_RECHNUNGSPOSITIONEN.TARIF,
    EINZELPREISBRUTTO type of column TBL_RECHNUNGSPOSITIONEN.EINZELPREISBRUTTO)
as
begin
  insert into tbl_rechnungspositionen (
    rechnungspositionennr,
    rechnungnr,
    patientennummer,
    behandlungsdatum,
    mitarbeiternummer,
    behandler,
    gebuehnr,
    codenr,
    suchwort,
    text,
    goaenr,
    menge,
    faktor,
    einzelpreis,
    steuercode,
    steuerbetrag,
    steuersatz,
    gesamtbetrag,
    anlage,
    anlagebenutzer,
    aenderung,
    aenderungbenutzer,
    merker,
    tierenr,
    kategorie,
    splitting,
    medikament,
    gebuehrennr,
    typ,
    lkz,
    behandlernummer,
    gehoertzu,
    tarif,
    einzelpreisbrutto)
  values (
    :rechnungspositionennr,
    :rechnungnr,
    :patientennummer,
    :behandlungsdatum,
    :mitarbeiternummer,
    :behandler,
    :gebuehnr,
    :codenr,
    :suchwort,
    :text,
    :goaenr,
    :menge,
    :faktor,
    :einzelpreis,
    :steuercode,
    :steuerbetrag,
    :steuersatz,
    :gesamtbetrag,
    :anlage,
    :anlagebenutzer,
    :aenderung,
    :aenderungbenutzer,
    :merker,
    :tierenr,
    :kategorie,
    :splitting,
    :medikament,
    :gebuehrennr,
    :typ,
    :lkz,
    :behandlernummer,
    :gehoertzu,
    :tarif,
    :einzelpreisbrutto);
end^

SET TERM ; ^

/* Folgende GRANT Anweisungen werden automatisch generiert */

GRANT INSERT ON TBL_RECHNUNGSPOSITIONEN TO PROCEDURE TBL_RECHNUNGSPOSITIONEN_INS;

/* Aktuelle Priviligien auf dieser Prozedur */

GRANT EXECUTE ON PROCEDURE TBL_RECHNUNGSPOSITIONEN_INS TO "PUBLIC";
GRANT EXECUTE ON PROCEDURE TBL_RECHNUNGSPOSITIONEN_INS TO SYSDBA;
Ich denke das Liegt an den Triggern. kann mn alles in eine Proc packen inklusive der Schleife?
Walter Landwehr
Mfg

Walter
  Mit Zitat antworten Zitat