Jump to content
  • 0
Sign in to follow this  
Elena

Sql Question

Question

Hi Jan or May Music,

 

In the details page of the report table, I am trying to sum up the values of fields that are both direct fields and calculated fields. It's returning me the "Error in formula" message.

 

I am missing something (I'm not even sure if calculated fields can be summed up like this), can you please let me know what it is?

 

Below is the code:

 

SELECT
SUM([@calcfield:1])
+ SUM([@field:Experience_Min])
+ SUM([@field:Education_Min])
+ SUM([@field:ConsequencesErrorsNew])
+ SUM([@field:Education_Min] )
+ SUM([@field:Work_Delegation])

+ SUM([@calcfield:29] )
+ SUM([@calcfield:28] )
+ SUM( [@calcfield:36] ))
FROM SJECS where [@field:Last_Name]>[@LName]

 

All values are in number format.

 

Share this post


Link to post
Share on other sites

7 answers to this question

Recommended Posts

  • 0

Hello Elena,

 

You can use following code in the calculate field:

SELECT SUM([@calcfield:1]+[@field:Experience_Min]+[@field:Education_Min]+[@field:ConsequencesErrorsNew]+[@field:Work_Delegation]+[@calcfield:29]+[@calcfield:28]+[@calcfield:36]) FROM SJECS WHERE [@field:Last_Name]>[@LName]

 

Hope it helps.

Share this post


Link to post
Share on other sites
  • 0

Hello Elena,

 

As far as I know, "Select" takes the data from table "SJECS", but values of calculated fields are not saved in the table.

 

Maybe, you can add this calculated fields to your table? I mean, add fields and enter values for every record.

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...
Sign in to follow this  

×
×
  • Create New...