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 6869069
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T03:30:44+00:00 2026-05-27T03:30:44+00:00

I tried to execute the following code when I ran into a wierd error.

  • 0

I tried to execute the following code when I ran into a wierd error.
I hope you guys can help me out here 🙂

CREATE TRIGGER Vlucht_Duurtussenstop
   ON  dbo.Vlucht
   AFTER UPDATE,INSERT
AS 
BEGIN
 IF (new.Duurtussenstop <> old.Duurtussenstop)
    BEGIN
      EXECUTE dbo.testprocudure1
         @p_vluchtDuurtussenstop = Duurtussenstop
    END
END
GO

Gives

[15:50:03] Gert-Jan Bos: Msg 102, Level 15, State 1, Line 7
Incorrect syntax near ' '.
Msg 102, Level 15, State 1, Line 12
Incorrect syntax near ' '.
Msg 102, Level 15, State 1, Line 14
Incorrect syntax near ' '.
  • 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-05-27T03:30:44+00:00Added an answer on May 27, 2026 at 3:30 am

    SQL Server doesn’t have new and old. It has inserted and deleted pseudo-tables, but these may contain multiple rows if the original statement affected multiple rows.

    It would also be unclear, from your usage, whether testprocudure1 is being called with the old value or the new value, so I can’t re-write your query at this time.


    Ideally, the body of the testprocudure1 could be expanded out in the trigger, to avoid having to use a cursor – but to find the rows that you’re interested in, the query would resemble:

    SELECT i.Duurtussenstop,d.Duurtussenstop
    FROM
        inserted i
            join
        deleted d
            on
                 i.Col1 = d.Col1 and
                 i.Col2 = d.Col2
    

    where I assume the primary key on the table is (Col1,Col2)

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

Sidebar

Related Questions

I am new to Robotium and tried to execute following code to launch an
Why does the following code execute six times? Please help me to understand how
I received an error when an referenced .NET Framework 2.0 assembly tried to execute
Tried following the instructions here: How to use Google app engine with my own
I tried to execute the following actionscript3 program and I am surprised of the
I'm using the following code to execute a query in Lucene.Net var collector =
I have the following code: try { //Create connection SQLiteConnection conn = DBConnection.OpenDB(); //Verify
I tried to set a connection timeout with the following code: public class ConnectionTimeout
I have the following code: <?php $FILE=giant-data-barf.txt; $fp = fopen($FILE,'r'); //read everything into data
I tried some work using http handler and found that we can not execute

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.