# How to Compare Entries

**URL:** <https://www.ruby-forum.com/t/how-to-compare-entries/126761>\
**Category:** Rails\
**Created:** [January 22, 2008, 12:29am UTC](https://www.ruby-forum.com/t/how-to-compare-entries/126761 "2008-01-22T00:29:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sithadmin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/858c86/32.png) [@sithadmin](https://www.ruby-forum.com/u/sithadmin)\
**Post date:** [January 22, 2008, 12:29am UTC](https://www.ruby-forum.com/t/how-to-compare-entries/126761/1 "2008-01-22T00:29:24Z")

</div>

Hi,  
I am trying to compare entries that are in two different db tables… I  
am not sure how to do this. I have two models set up for the two tables

- BES and Import. Each table contains a column that holds a telephone  
number - I want to compare the two and display entries that match, then  
show ones that don’t match afterward. Does anybody have any suggestions  
on how to do this? I’m very new to RoR… BTW, I’m running InstantRails  
v1.6

Thanks,

- Jeff M.

---

<div class="post-metadata">

**Author:** ![sithadmin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/858c86/32.png) [@sithadmin](https://www.ruby-forum.com/u/sithadmin)\
**Post date:** [January 22, 2008, 7:48am UTC](https://www.ruby-forum.com/t/how-to-compare-entries/126761/2 "2008-01-22T07:48:27Z")

</div>

Hi,  
you can try one to one relationship…

Regards

Abirami
