Jump to content
  • 0

Question

I am new so please excuse my SQL ignorance:

My trigger is working, EXCEPT for the fact that it is NOT INCLUDING the most recently inserted value in the CommentHRS field in the sum (CA_TOTALhrs).  

Trying to be clear here:  It's properly calculating the SUM on the insert event, but just not including the newly inserted value as part of the sum.  

(The actions with the red X work fine.  No problems there.)     Why would it not include the value that was just inserted in the SUM?

Thanks.  Mike 

image.png.52a320ef10f447a020e99e3629e21b87.png

 

 

Share this post


Link to post
Share on other sites

1 answer to this question

Recommended Posts

  • 0

You should add the sum to the inserted Value.

Screenshot_1.thumb.png.6ab29adbdb67b48587d713552e22eacc.png

 

Reading the trigger, You are only summing up the CommentHRS. Meaning to say, the inserted one is still excluded, since you are  still on the process of inserting the Data.

 

I hope this helps. 

Share this post


Link to post
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.

Guest
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.

Loading...

×
×
  • Create New...