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();
db2Crns=testDB2Connect.getDb2LoggedInCrns();
oracleCrns=testOracleConnection.getDataFromPartyAuditInfo();
int array1Size = db2Crns.size();
int array2Size = oracleCrns.size();
System.out.println(db2Crns.size());
System.out.println(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++)
{
if(oracleCrns.get(i)==(db2Crns.get(j)))
{
k++;
}
}
leftOverCrns.add(val+k);
}
System.out.println(leftOverCrns.size());
for(int x=0;x<leftOverCrns.size();x++)
{
System.out.println(leftOverCrns.get(x));
}
}
}