-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Brandon, Nicholas (UK) wrote:
> I have a table with first_name and a last_name column. I would like to
> find similar duplicates
BTW there exists a whole algorithm for doing this with part influenced
by the medical industry (matching patient records)
>
> You probably want
>
> x.first_name like substr(y.first_name, 1,2) || '%'
>
> or
>
> substr(x.first_name, 1, 2) = substr(y.first_name, 1, 2)
>
> Igor Tandetnik
>
Igor, Peter, Thanks very much for your help.
This
"Brandon, Nicholas (UK)"
<[EMAIL PROTECTED]> wrote in
message
news:[EMAIL PROTECTED]
> I have a table with first_name and a last_name column. I would like to
> find similar duplicates by finding the same last_name and matching the
> first two characters of the first name. Therefore if the table
On Thu, Jul 31, 2008 at 12:54:02PM +0100, Brandon, Nicholas (UK) wrote:
> select * from current as x, current as y where x.last_name = y.last_name
> and x.ind_id != y.ind_id and x.first_name like substr(y.first_name, 0,2)
>
> In my english I was trying to write "match where the first name of x
>
This should be simple but my brains not functioning. So I would
appreciate some help from the SQL masters...
I have a table with first_name and a last_name column. I would like to
find similar duplicates by finding the same last_name and matching the
first two characters of the first name.
5 matches
Mail list logo