troubleshooting Question

I am getting the following error

Avatar of ewgf2002
ewgf2002Flag for United States of America asked on
Oracle Database
5 Comments1 Solution868 ViewsLast Modified:
When I run this query I am getting the following error: ORA-00950:

select jobplan.description as jpdesc,
pm.assetnum, pm.frequency, pm.nextdate, pm.location, pm.crewid, pm.frequnit, pm.lead,
pm.description as pm_description,asset.description as asset_description,jobplan.jpduration,
pmsequence.jpnum as pmseq_jpnum, pm.pmnum, pm.siteid,PMSEQUENCE.INTERVAL, PM.PMCOUNTER ,
PM.JPSEQINUSE, pm.STATUS,
 
CASE WHEN PM.JPSEQINUSE='1' THEN 'YES'
WHEN PM.JPSEQINUSE='0' THEN 'NO'
ELSE ' ' END as "JPSEQ",
 
CASE WHEN PM.JPSEQINUSE = '1' THEN
  (((PMSEQUENCE.INTERVAL*(Abs(1-PM.PMCOUNTER/PMSEQUENCE.INTERVAL ))) * (pm.FREQUENCY *
  (CASE
  WHEN pm.frequnit = 'DAYS' THEN '1'
  WHEN pm.frequnit='WEEKS' THEN '7.0192307697'
  ELSE '30.41666667' END)))+pm.NEXTDATE) as "JPnextdate"
 
ELSE (((pm.FREQUENCY * (CASE WHEN pm.frequnit = 'DAYS' THEN '1'
                        WHEN pm.frequnit='WEEKS' THEN '7.0192307697'
                        ELSE '30.41666667'
                        END))) + pm.NEXTDATE) as "JPnextdate"
END

FROM MAXIMO.PMSEQUENCE, MAXIMO.JOBPLAN, MAXIMO.PM, MAXIMO.ASSET
 
WHERE JOBPLAN.JPNUM = PMSEQUENCE.JPNUM
AND PM.PMNUM = PMSEQUENCE.PMNUM
AND PM.ASSETNUM = ASSET.ASSETNUM
and pm.siteid = :mrosite
AND PM.ASSETNUM IN ('12700','12300')
order by pm.assetnum, PM_DESCRIPTION, INTERVAL
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 5 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 5 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros