metamodel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vinu Agnihotri <vinuagniho...@gmail.com>
Subject Aggregate SUM Function not working when the value in the Column is Null or Blank
Date Mon, 11 Aug 2014 03:32:24 GMT
Hi Kasper,

I am from Singapore and have recently started using the META Model.

My Database is a CSV file.

I am using the aggregate SUM function in a simple Aggregate Function using
a  group by query.

Select...... (FUNCTION.SUM, (Column_Name)

In this case there is a time where the values in the row is blank or null
for the  column for which I am doing the SUM Aggregation

When this is the case I am getting an error "Could not convert to number: "
 "

What I intend to do is either make the value 0 when it is Null or not
include these null values while doing the aggregation.

NO    Name   Amount
1      Origin       50
2      House
3      Origin      30
4      House     40

In the above example when I do a SUM on Amount group by Name, I expect to
have two rows as a output with origin as 80 and  House as 40 as their
Amounts , but since for no 2 the amount is null, My code does not complies
and I get the error.


My apologies for asking such an easy question

Thanks
Vinayak

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message