i want to compare names in two different tables and then equal get details
<p>i have two different tables.I want to compare the names in two tables,if both the names are equal then i want to get the details.how can i do that? please help me.</p>

<p>Here is the code:   </p>

<pre><code>Cursor cr=mDbManager.fetchnewcustomerdata();
        Cursor cr1 = mDbManager.fetchinvoicecustomerdata();
        cr1.moveToFirst();
        //String address;
        while (!(cr1.isAfterLast())) {
            String name = cr1.getString(cr1.getColumnIndex("icstname"));
            if(name.equals(cr.getString(cr.getColumnIndex("cname"))))
            {
                 Toast.makeText(this,"equal",1000).show();
            }
            String address = cr1.getString(cr1.getColumnIndex("caddress"));
            map.put(name, address);
            nameAList.add(cr1.getString(cr1.getColumnIndex("icstname")));
            cr1.moveToNext();
        }
        mDbManager.close();
}
</code></pre>
