in reply to Re: DBI and fetchall_arrayref (gosh!)
in thread DBI and fetchall_arrayref (gosh!)
The reason for this monster: well entries in columns can be '-1' (indicating the category was not applicable at entry time). So in order to get statistics, I have to change the -1's to nulls - that way Oracle doesn't include the nulls in the AVG calculations.... Regards, Stacy.$sth = $dbh->prepare(qq{ SELECT avg(DECODE(cat1, -1,null,cat1)), . . . avg(DECODE(cat15, -1,null,cat15)) FROM TABLE });
|
|---|