Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
swdepew
Starting Member
1 Post |
Posted - 2011-12-06 : 11:03:46
|
| I know nothing about SQl language but I was wondering if someone would be kind enough to offer some assistance. In Maximo there and objects know as PMs or preventative maintenance schedules. As these maintenance schedules become due they are turned into work order blah blah blah….. we get out work done and then the PM waits until the next maintenance cycle. 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 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.Can anyone help me with this? |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-12-06 : 11:07:51
|
| the posted code doesnt look like sql server. Please post this in relevant forums at www.dbforums.com. this is ms sql server forum and we support only sql server related issues as we dont have too many people with other RDBMS knowledge------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
|
|
|