need to check different entry that runs in diffrent timing criteria

Need a java that code check the below table details and get the id and name .
Table name: Run
I am using query to check whether any entry that is currently in waiting status should not be more than 10min

Run id      Run name      Start_date      End_date      Intiated_by      status
45                Footjob      07-APR-15      07-APR-15      ramesh      Runned
21                 crcjob              27-JUL-16      27-JUL-16      suresh      Runned
88               kuljob             28-JUL-16      28-JUL-16      kullal      Runned
76             nanjob            28-JUL-16      28-JUL-16      jillu              Runned
89               harjob             28-FEB-18                           admin      waiting

Current query : select Run id,24*60*(SYSDATE - START_DATE) time from Run where STATUS ='WAITING’ and (24*60*(SYSDATE - START_DATE))>10,

I need to get the id and name of entry which is in below condition.
Problem here is I want get different entry data for example
Footjob should not run more than 2hours which is in waiting status, kuljob should not run more than 30min which is in waiting status
Time differs for each entry
Nandha Kumar BAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

CEHJCommented:
Your question is unclear
0
Nandha Kumar BAuthor Commented:
how to check entries in table and set different criteria for each entries using java .

entry one should not be more than 10min, (i.e.,) the sysdate-(minus)startdate >10min
entry two should not be more than 15min,(i.e.,) the  sysdate-(minus)startdate >15min
0
CEHJCommented:
Are you saying if the results don't meet those criteria, you want to do an update or what?
0
Become a CompTIA Certified Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

Nandha Kumar BAuthor Commented:
if the result didt meet that criteria i wanna get respective Run id and name.

please find below JAVA code which i have already used, but i am able to get only the if the entry run more than 10min. i want to set different time criteria for different entries

entry one should not be more than 10min, (i.e.,) the sysdate-(minus)startdate >10min
entry two should not be more than 15min,(i.e.,) the  sysdate-(minus)startdate >15min

package com.philips.tam.dao;
import java.sql.Connection;
import java.sql.ResultSet;


import java.sql.Statement;

import com.philips.tam.configuration.TamConfiguration;

public class JobnotificationDAO {
      private String getNotificationJob(){
            String strQuery="select Run id,Name from Run where STATUS ='WAITING’ and (24*60*(SYSDATE - START_DATE))>10";
            return strQuery;
      }
            
public String executeNotificationjob(Connection con){
      String strResult="";
      try {
            Statement stmt = con.createStatement();
            ResultSet rs = stmt.executeQuery(getNotificationJob());
            String Name;
            int Run ID;
            int id;
            double time;      
            //Date created_date;
            strResult=strResult+"The long running\n";
            while(rs.next()){
                  Name=rs.getString(2);
                  Run id=rs.getInt(2);
                  //      expiryDays=rs.getInt(4);
                  strResult=strResult+"runName: "+Name+"\n";
                  strResult=strResult+"run Id: "+Run id+"\n";
                  //con.createStatement().executeQuery(getNotificationdeletion(recordId));
                  //strResult=strResult+"Notification records deleted\n";
            }
      
            rs.close();
            stmt.close();
      } catch (Exception e) {
            strResult=strResult+e.getMessage()+"\n";
      }
      return strResult;
}

}
0
CEHJCommented:
You can only really do that by ORing the criteria you're interested in into the query.
0
Nandha Kumar BAuthor Commented:
could you explain how to do that
0
CEHJCommented:
There's no magic really - it's just a question of concatenating the strings of the query into one query
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Java

From novice to tech pro — start learning today.