Jump to content
  • 0

Trigger logic doesn't make sense?



Hi, hope someone can help me out on this as this is driving me nuts. It might sound stupid but its actually a very simple application of matching.

I am trying to match two numbers in Table 1 (Test) and if they matched, update the result on Table 2 (Test2). My problem is when the number matches, it shows me the result "Not matched" and vice versa. The result is inverse of the logic that I have built. Of course I could live with it, just inverse all the results but I feel that I might be missing something here so hope someone can advise me. As below are the screenshots of both tables and the trigger logic for Test Table. Thanks.







Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

Hi @Casper,

As far as I understood you need to match numbers on insert and update and insert the status in a different table. What this trigger does, it checks if the ID is already present in the Second table. If NO - then Insert new record with the proper status, if YES - then Update existing record.


Here is tables design as well:

image.png         image.png

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...