This is an archive of the Maximo Yahoo Community. The content of this pages may be a sometimes obsolete so please check post dates.
Thanks to the community owner Christopher Wanko for providing the content.
Hi all,
When I click 'update' option which resides next to kpi graph detail then I came across the following error.
BMXAA2485E - The KPI could not be run successfully due to an unexpected error. Please contact your system administrator.
Query:
-----
SELECT ((select count(*) from workorder where workorderid in (select ownerid from slarecords where slanum= 'SLA-REP-01' and ownertable= 'WORKORDER' ) and classstructureid in(select classstructureid from classstructure where classificationid = 'REP') and MONTH(TARGCOMPDATE)= (SELECT MONTH (current date) FROM sysibm.sysdummy1)) / (select count(*) from workorder where workorderid in (select ownerid from slarecords where slanum= 'SLA-REP-01' and ownertable= 'WORKORDER') and classstructureid in(select classstructureid from classstructure where classificationid = 'REP') and MONTH(ACTFINISH)= (SELECT MONTH (current date) FROM sysibm.sysdummy1) and ACTFINISH<=TARGCOMPDATE ) ) * 100 from dummy_table
When I past this query on SQL prompt then I came to know the reason of this error is 'Divison by Zero'.
I do not want to see this error on KPI application when I press 'Update' option, how is it possible to avoid this error? Can I use exception with my above query? Can you explain me how to describe exception with my query?
Look forward ....!
Regards
Shah
set the divisor to have a null value of one - the nvl command checks to see if there is any value and if there is NOT, it will use the default of one. As dividing by one does not change the results, it is the value you want here. This will handle your exceptions w/o having to write a lot of complicated code and escape clauses.
.... / nvl((select count(*) from workorder where workorderid in (select ownerid from slarecords where slanum= 'SLA-REP-01' and ownertable= 'WORKORDER') and classstructureid in(select classstructureid from classstructure where classificationid = 'REP') and MONTH(ACTFINISH)= (SELECT MONTH (current date) FROM sysibm.sysdummy1) and ACTFINISH<=TARGCOMPDATE ),1) ) * 100 from dummy_table
Pat Morrow
pmorrow8@yahoo.com
From: shah faisal <dba_develper@yahoo.com>
To: Maximo Group <MAXIMO@yahoogroups.com>
Sent: Friday, August 5, 2011 10:32 PM
Subject: [MAXIMO List] Maximo error: 'Divison by 0' error by KPI
Hi all,
When I click 'update' option which resides next to kpi graph detail then I came across the following error.
BMXAA2485E - The KPI could not be run successfully due to an unexpected error. Please contact your system administrator.
Query:
-----
SELECT ((select count(*) from workorder where workorderid in (select ownerid from slarecords where slanum= 'SLA-REP-01' and ownertable= 'WORKORDER' ) and classstructureid in(select classstructureid from classstructure where classificationid = 'REP') and MONTH(TARGCOMPDATE)= (SELECT MONTH (current date) FROM sysibm.sysdummy1)) / (select count(*) from workorder where workorderid in (select ownerid from slarecords where slanum= 'SLA-REP-01' and ownertable= 'WORKORDER') and classstructureid in(select classstructureid from classstructure where classificationid = 'REP') and MONTH(ACTFINISH)= (SELECT MONTH (current date) FROM sysibm.sysdummy1) and ACTFINISH<=TARGCOMPDATE ) ) * 100 from dummy_table
When I past this query on SQL prompt then I came to know the reason of this error is 'Divison by Zero'.
I do not want to see this error on KPI application when I press 'Update' option, how is it possible to avoid this error? Can I use exception with my above query? Can you explain me how to describe exception with my query?
Look forward ....!
Regards
Shah
We had a similar issue so we converted the query to a function and then called the function from within the kpi module. This will resolve the error.
From: shah faisal [mailto:dba_develper@yahoo.com]
Sent: Friday, August 05, 2011 09:32 PM
To: Maximo Group <MAXIMO@yahoogroups.com>
Subject: [MAXIMO List] Maximo error: 'Divison by 0' error by KPI
Hi all,
When I click 'update' option which resides next to kpi graph detail then I came across the following error.
BMXAA2485E - The KPI could not be run successfully due to an unexpected error. Please contact your system administrator.
Query:
-----
SELECT ((select count(*) from workorder where workorderid in (select ownerid from slarecords where slanum= 'SLA-REP-01' and ownertable= 'WORKORDER' ) and classstructureid in(select classstructureid from classstructure where classificationid = 'REP') and MONTH(TARGCOMPDATE)= (SELECT MONTH (current date) FROM sysibm.sysdummy1)) / (select count(*) from workorder where workorderid in (select ownerid from slarecords where slanum= 'SLA-REP-01' and ownertable= 'WORKORDER') and classstructureid in(select classstructureid from classstructure where classificationid = 'REP') and MONTH(ACTFINISH)= (SELECT MONTH (current date) FROM sysibm.sysdummy1) and ACTFINISH<=TARGCOMPDATE ) ) * 100 from dummy_table
When I past this query on SQL prompt then I came to know the reason of this error is 'Divison by Zero'.
I do not want to see this error on KPI application when I press 'Update' option, how is it possible to avoid this error? Can I use exception with my above query? Can you explain me how to describe exception with my query?
Look forward ....!
Regards
Shah
</PRE><BR>********** Confidentiality Notice **********<BR>This electronic transmission and any attached documents or other writings<BR>are confidential and are for the sole use of the intended recipient(s)<BR>identified above. This message may contain information that is privileged,<BR>confidential or otherwise protected from disclosure under applicable law.<BR>If the receiver of this information is not the intended recipient, or the<BR>employee, or agent responsible for delivering the information to the<BR>intended recipient, you are hereby notified that any use, reading,<BR>dissemination, distribution, copying or storage of this information is<BR>strictly prohibited. If you have received this information in error, please<BR>notify the sender by return email and delete the electronic transmission,<BR>including all attachments from your system.<BR> <BR> <PRE>
Hi Pat Morrow,
Note: I am working in db2 database.
Thanks for reply, but it does not work because there is no null excpet 0.
for example: select 24/0 from sysibm.sysdummy1
how to handle this kind of query which generates the error 'Division by 0/zero'?
Look forward ...!
Regards
Shah
--- On Sat, 8/6/11, Pat Morrow <pmorrow8@yahoo.com> wrote:
From: Pat Morrow <pmorrow8@yahoo.com>
Subject: Re: [MAXIMO List] Maximo error: 'Divison by 0' error by KPI
To: "MAXIMO@yahoogroups.com" <MAXIMO@yahoogroups.com>
Date: Saturday, August 6, 2011, 5:11 PM
set the divisor to have a null value of one - the nvl command checks to see if there is any value and if there is NOT, it will use the default of one. As dividing by one does not change the results, it is the value you want here. This will handle your exceptions w/o having to write a lot of complicated code and escape clauses.
.... / nvl((select count(*) from workorder where workorderid in (select ownerid from slarecords where slanum= 'SLA-REP-01' and ownertable= 'WORKORDER') and classstructureid in(select classstructureid from classstructure where classificationid = 'REP') and MONTH(ACTFINISH)= (SELECT MONTH (current date) FROM sysibm.sysdummy1) and ACTFINISH<=TARGCOMPDATE ),1) ) * 100 from dummy_table
Pat Morrow
pmorrow8@yahoo.com
From: shah faisal <dba_develper@yahoo.com>
To: Maximo Group <MAXIMO@yahoogroups.com>
Sent: Friday, August 5, 2011 10:32 PM
Subject: [MAXIMO List] Maximo error: 'Divison by 0' error by KPI
Hi all,
When I click 'update' option which resides next to kpi graph detail then I came across the following error.
BMXAA2485E - The KPI could not be run successfully due to an unexpected error. Please contact your system administrator.
Query:
-----
SELECT ((select count(*) from workorder where workorderid in (select ownerid from slarecords where slanum= 'SLA-REP-01' and ownertable= 'WORKORDER' ) and classstructureid in(select classstructureid from classstructure where classificationid = 'REP') and MONTH(TARGCOMPDATE)= (SELECT MONTH (current date) FROM sysibm.sysdummy1)) / (select count(*) from workorder where workorderid in (select ownerid from slarecords where slanum= 'SLA-REP-01' and ownertable= 'WORKORDER') and classstructureid in(select classstructureid from classstructure where classificationid = 'REP') and MONTH(ACTFINISH)= (SELECT MONTH (current date) FROM sysibm.sysdummy1) and ACTFINISH<=TARGCOMPDATE ) ) * 100 from dummy_table
When I past this query on SQL prompt then I came to know the reason of this error is 'Divison by Zero'.
I do not want to see this error on KPI application when I press 'Update' option, how is it possible to avoid this error? Can I use exception with my above query? Can you explain me how to describe exception with my query?
Look forward ....!
Regards
Shah