Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8477243
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T18:24:32+00:00 2026-06-10T18:24:32+00:00

i have the following trigger: INSTEAD OF UPDATE AS BEGIN SET NOCOUNT ON; INSERT

  • 0

i have the following trigger:

 INSTEAD OF UPDATE
AS

BEGIN
SET NOCOUNT ON;

        INSERT INTO [BUCHUNG] (BOOKUID, BOOKVERNR, BUCHUNGSART_ID, VERANSTALTER, PERSONAL_ID, 
        OPTIONSNUMMER, BUCHUNGSSTATUS, PERSONENZAHL, SERIE, THEMA, STORNO, UPDATE_DATE, UPDATE_USER, BEMERKUNG, V_EMAIL, V_TELEFON,
        KOSTENSTELLE, SERIENBOOKUID, THEMA_ENABLED, ABTEILUNG, LIEFERRAUM, ABRECHNUNG, KSTR, RECHKONTO, RECHDST, URSPRUNG_ORIGINAL, ORIGINAL_ID)

        SELECT i.BOOKUID, '0', i.BUCHUNGSART_ID, i.VERANSTALTER, i.PERSONAL_ID,
        i.OPTIONSNUMMER, i.BUCHUNGSSTATUS, i.PERSONENZAHL, i.SERIE, i.THEMA, i.STORNO, GETDATE(), i.UPDATE_USER, i.BEMERKUNG, i.V_EMAIL, i.V_TELEFON,
        i.KOSTENSTELLE, i.SERIENBOOKUID, i.THEMA_ENABLED, i.ABTEILUNG, i.LIEFERRAUM, i.ABRECHNUNG, i.KSTR, i.RECHKONTO, i.RECHDST, i.URSPRUNG_ORIGINAL,
        i.ORIGINAL_ID


        FROM INSERTED i 
        JOIN DELETED d ON i.ID = d.ID
        WHERE i.BOOKVERNR <> d.BOOKVERNR


        IF UPDATE (BOOKVERNR)

        UPDATE b
        SET BOOKVERNR = i.BOOKVERNR 
        FROM BUCHUNG b
        JOIN INSERTED i ON i.ID = b.ID

SET NOCOUNT OFF;      
END 

The Trigger copies an entire row with a new ID if a change in the original row happens. So far it works fine.
But something is going wrong, because PERSONENZAHL_EXTERN and RECHKST is not correct.

Look at the Picture: IMAGE

The first row is the old row. The second row is the inserted row. I don’t know what is wrong. Maybe you can help me with that.

Thanks in advance

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T18:24:34+00:00Added an answer on June 10, 2026 at 6:24 pm

    Your insert statement is simply missing those two columns. Add them and you will have your values.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following Trigger: ALTER TRIGGER [dbo].[DIENSTLEISTUNG_Update] ON [dbo].[DIENSTLEISTUNG] INSTEAD OF UPDATE AS
I have the following trigger: CREATE TRIGGER Users_Delete ON Users AFTER DELETE AS BEGIN
I have the following trigger which inserts records into Table B whenever Table A
I have the following trigger First trigger: ALTER TRIGGER [dbo].[DIENSTLEISTUNG_Update] ON [dbo].[DIENSTLEISTUNG] INSTEAD OF
I'm creating a trigger for a table, and I have the following statement: UPDATE
I have a view that has an INSTEAD OF INSERT trigger (in SQL Server
I have the following function that is supposed to trigger anytime one of the
I have the following code being run if an iphone/ipad/ipod is detected: $('.tooltip-trigger').tooltip({offset: [20,
I have been trying to use an update trigger which checks for the title_id
I have the following trigger on a table that redirects data and includes data

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.