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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×