Focal Point
What is FOCUS equivalent to Sum(x.columnname) in SQL? where x is a table name.

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/1617007986

March 20, 2018, 10:26 PM
Leela Krishna
What is FOCUS equivalent to Sum(x.columnname) in SQL? where x is a table name.
Hi Everyone,

I am trying to create a business view on a cluster synonym, I need to create a column for this business view which is equal to this piece of sql "sum(x.columnname)".i.e sum of a column. I am not sure how to do it in a define or a compute. I am using Data management console for this work.

Regards
Krishna

This message has been edited. Last edited by: Leela Krishna,


WebFOCUS 8
Windows, All Outputs
March 21, 2018, 08:53 AM
vinodh
A define is performed on each record as it is input to the TABLE request.

The compute is performed after the TABLE request processes the selection criteria and any sorting, you can do a compute without sorting; the computed field is part of the output of the TABLE request, a defined field is only present in the output if included in the SUM/PRINT/WRITE variable list.

what is your final objective. Are you trying to sum the columnname and use it in the datamigrator data flow or going to use it in a report creation?


WebFOCUS 8
Windows, All Outputs
March 21, 2018, 12:44 PM
Leela Krishna
Hi Vinodh,

Yes, I want to sum the column and use it as a new column in a business view for report creation.


WebFOCUS 8
Windows, All Outputs