Best answer

SQL Server - 'New/Updated Row' only triggers on new rows

  • 25 October 2021
  • 9 replies
  • 392 views

Userlevel 1

Hi

The SQL Server New/Updated Row trigger isn't picking up any updated rows - only picks up new rows;

Have orded by Date Col.

Trigger column left blank io trigger on changes to cells in all columns.

Does this mean changes to any Column? Not quite sure why this is not triggering..

 

Thanks so much

icon

Best answer by MartyB 25 October 2021, 07:07

View original

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

9 replies

Userlevel 5
Badge +6

Hey @MartyB ,

 

Can you share screenshot of how did you configure trigger event? 

 

Also, I will suggest read some help articles about MySQL here https://zapier.com/apps/mysql/help

Userlevel 1

DaysDate is a calendar date and remains constant for update

Userlevel 1

Thanks @jayeshkumarbhatia 

Userlevel 7
Badge +14

Hi @MartyB 

New Rows Don't Trigger!

Last updated: January 27, 2020

You may setup a Zap and discover that new rows aren't triggering.
Or perhaps they were triggering but all of the sudden stopped triggering.
What's going on?

You should double check your Zap's filters to make sure you have selected an Order By field.
You can find this where you 'edit options' for the MySQL trigger.

Filters

It is very important that you select a field here.
When we query your database we'll only pull a set number of records at a time (since we cannot pull all of them) and with no field to order by we'll most likely get the default ordering.

Your primary key would be an excellent choice here if it is auto incremented.
Creation dates are also good candidates as well. But leaving this field empty could lead your Zap to stop triggering on new rows because it can't see them anymore.

Userlevel 5
Badge +6

Hey @MartyB 

 

Do you have any column that records last modified time? If no, than this might be the reason of not triggering for updates. DaysDate column value is constant and it will not trigger for new updates.

 

 

https://zapier.com/help/doc/common-problems-sql-server-mssql#my-trigger-of-new-updated-row-isnt-picking-up-any-of-my-updates

Userlevel 1

So if we have a SQL update trigger to update the time in a separate field, and order by that field, that should solve the prob?

Userlevel 5
Badge +6

@MartyB  Adding last modified date column in your table and selecting this column in Order By Input should solve your problem.

Userlevel 1

Thanks will do that...

Userlevel 5
Badge +6

@MartyB I found an article on how you can create last modified column. https://database.guide/create-a-last-modified-column-in-sql-server/