hi, there are 2 different database 1 database have the list of all the users
and another DB only have the details of users who are logged in which is production DB.

i have writthen below code but i am stuck over here plese do the needful.

package com.kotak.autoblocknb.transaction;

import java.lang.reflect.Array;
import java.sql.SQLException;
import java.util.ArrayList;

import com.kotak.autoblocknb.test.db2.TestDB2Connect;
import com.kotak.autoblocknb.test.oracle.TestOracleConnection;

 * @author swati.jha
public class Transaction {

     * @param args
     * @throws SQLException 
    public static void main(String[] args) throws SQLException {
        // TODO Auto-generated method stub

        TestDB2Connect testDB2Connect=new TestDB2Connect();
        TestOracleConnection testOracleConnection=new TestOracleConnection();

        ArrayList db2Crns=new ArrayList();      
        ArrayList oracleCrns=new ArrayList();
        ArrayList leftOverCrns=new ArrayList();

        int array1Size = db2Crns.size();  
        int array2Size = oracleCrns.size();

        for(int i=0;i<oracleCrns.size();i++)
            String val=oracleCrns.get(i).toString();
            int k=0;

            for(int j=0;j<db2Crns.size();j++)




       for(int x=0;x<leftOverCrns.size();x++)

this is little bit easy...

i don't know why u following two database..may be you said DB instead of Table..

u just update user logged in date ...

that is you should have column in table like DATE_LOGGED_IN_LAST...

THEN your table has details of logging with recent activity date..

after then you just pass query as select user_name from logg_table where DATE_LOGGED_IN_LAST < date_six_month_back or DATE_LOGGED_IN_LAST NOT BETWEEN today AND date_six_month_back;

so far i thought this is your requirements...

This article has been dead for over six months. Start a new discussion instead.