Re: INSERT Trigger

From: Ralf Herlitze (Ralf.Herlitze_at_dfg.de)
Date: 02/10/04


Date: Mon, 9 Feb 2004 23:55:38 -0800

Hallo Olaf,
danke für die Antwort.

>Ich würde die identity-Eigenschaft verwenden, um die ID
vom Server automatisch generieren zu lassen.

Innerhalb einer ID soll ein anderes Feld hochgezählt
werden, immer von 0 beginnend. Sonst könnte man das so
machen.

>Oder packe die Logik in eine SP,

Das wäre schön, die Datensatz-Erzeugung findet
aber in einer (fehlerhaften) Anwendung statt.

>Anstatt eine SP wäre wohl auch ggf. ein instead of
>trigger möglich, siehe BOL.

Neues Thema für mich, damit muß ich mich mal befassen.
Danke
Ralf



Relevant Pages

  • Re: Trigger is not working when I test
    ... I also can't help wonderining ... why on earth you are using a trigger for something that could be very simply ... CONSTRAINTS in BOL. ... >> the rows that may be changed by the user action. ...
    (microsoft.public.sqlserver.programming)
  • Re: Copy identity key in new record in related table.
    ... If you read the BOL on @@IDENTITY you will see it is prone to problems if ... something else (like a trigger) inserts another record after you insert one. ... Scott ... > I will read about the the other two options, in the BOL ...
    (microsoft.public.sqlserver.programming)
  • Re: Disallowing/Ignoring Insert based on certain column value
    ... Look up "Check Constraints" in BOL. ... > Can anyone help me on writing a trigger that disallows insert into the ...
    (microsoft.public.sqlserver.programming)
  • RE: Trigger is not working when I test
    ... This is from BOL. ... the rows that may be changed by the user action. ... CREATE TRIGGER CheckStock ON ... > When testing I get an error message "invalid object name ...
    (microsoft.public.sqlserver.programming)
  • Re: Trigger and SP
    ... Can you point me to the ref in the BOL? ... SQL Server MVP ... Columnist, SQL Server Professional ... a trigger CAN have a parameter passed FROM it to a stored ...
    (microsoft.public.sqlserver.programming)