Jump to content
  • 0

How to save an aggregate value in a table


ServiceBreez

Question

3 answers to this question

Recommended Posts

  • 0

Hello @ServiceBreez,

I had the same question but discovered that it is not possible to save aggregation values from the DataPage in the table.

As a workaround, it is possible to create an Application Task or Trigger that will calculate the SUM, for example, and insert/update it in the table. 

You may find the following forums posts helpful:

Feel free to update this thread if you have further questions.

Regards

Link to comment
Share on other sites

  • 0

it seems that this error occurs when you are trying to set one of your columns using the UPDATE statement with a value that uses an aggregate functions such as the SUM, MAX, or MIN. 

Therefore, it is not valid because in SQL it is impossible to use aggregate functions in update SET list. 

With this, you may try to do a use case is to add a so-called subquery (SELECT statement) and use this subquery in a JOIN. For more information,I have found a forunm post that is similar to your workflow. You may check this link as a reference: 
https://forums.caspio.com/topic/32756-task-to-update-the-parent-table-with-aggregated-values-from-the-child-table/?do=findComment&comment=83154

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.

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