Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8620

Re: Difference Between "nvl() and Sum(nvl())..."

$
0
0

The nvl() function is just going to replace No_value/ Null with 0.

 

So, you are asking if you add aggregation function (sum, count, etc.,) in this measure does it affect the existing reports,

 

Can't say exact answer, because

 

Before : your backend sql,

select column1, column2, column_name, ... from table_name

Result set : 100 records

 

After you add sum(): your sql,

select column1, column2, sum(column_name), ... from table_name

Result set: 2 Records

 

This sum() is going to do a group by () on your database and bring the aggregated values and improves performance and may drastically minimize number of records. So if the report developers puposefully didn't put sum() in this measure (Ex: They want see each record without any aggregation), then adding sum() may affect that report,

If this Measure is just used to find totals etc, then its not going to affect the reports

 

For more info: SQL Aggregate Versus Universe Projection


Viewing all articles
Browse latest Browse all 8620

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>