I know very little about daatbase structuring or programming languages but I was wondering if someone would be kind enough to offer some assistance. In Maximo there are objects known as PMs or preventative maintenance schedules. As these maintenance schedules become due they are turned into work orders blah blah blah….. we get our work done and then the PM waits until the next maintenance cycle to become due again. However on the start page of the program it has portlet windows that display the results of search queries that are saved in the program. Using the user friendly search window I can manipulate the results and always show what I want. Now that the back story is complete, I am looking for someone who would help me write a query in SQL or whatever language required so that the results that come up will change as time goes on. Meaning as these PM's come due I want them to show up on my start page portlet and not have to manually search for PM's over a set time period. Someone at my facility attempted to do that for me but it didn’t quite work the way we had both hoped.
status = 'ACTIVE' and upper(description) like '%VALVE TRAIN%'
and to_char(nextdate, 'YYYY') = to_char(sysdate+30, 'YYYY')
and to_char(nextdate, 'MM') = to_char(sysdate+30, 'MM')
and siteid = 'MARSHALL'
This is what he came up with. What happened was it showed everything from the current date plus 30 days until the 2nd of December then it dumped all the results for the rest of December and pulled up the ones for January.