* * *

Author Topic: Oracle problem.  (Read 1098 times)

BSaidus

  • Full Member
  • ***
  • Posts: 229
  • lazarus 1.6.4 Win8.1 / cross FreeBSD
Oracle problem.
« on: March 01, 2018, 10:38:04 am »
Hello;
I have this message while trying to open a TZQuery :
 
Code: Pascal  [Select]
  1. OracleConnection1 : ORA-24347: d?tection d'une colonne NULL dans une fonction AGGREGATE
  2.  
Any help to bypasse this !!?
lazarus 1.6.4 Win8.1 / cross FreeBSD
dhukmucmur vernadh!

valdir.marcos

  • Hero Member
  • *****
  • Posts: 506
Re: Oracle problem.
« Reply #1 on: March 01, 2018, 12:52:44 pm »
ORA-24347: Warning of a NULL column in an aggregate function

Use the function NVL:
https://docs.oracle.com/cd/B19306_01/server.102/b14200/functions105.htm
https://docs.oracle.com/cd/B28359_01/olap.111/b28126/dml_functions_2048.htm#OLADM624

For example:
Code: SQL  [Select]
  1. SELECT AVG(NVL(Salary,0)) FROM Employee;

BSaidus

  • Full Member
  • ***
  • Posts: 229
  • lazarus 1.6.4 Win8.1 / cross FreeBSD
Re: Oracle problem.
« Reply #2 on: March 01, 2018, 03:48:48 pm »
ORA-24347: Warning of a NULL column in an aggregate function

Use the function NVL:
https://docs.oracle.com/cd/B19306_01/server.102/b14200/functions105.htm
https://docs.oracle.com/cd/B28359_01/olap.111/b28126/dml_functions_2048.htm#OLADM624

For example:
Code: SQL  [Select]
  1. SELECT AVG(NVL(Salary,0)) FROM Employee;


Thnks :)
lazarus 1.6.4 Win8.1 / cross FreeBSD
dhukmucmur vernadh!

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus