Re: Duplicate combination

2003-12-15 Thread fr0g
Chris Nolan wrote: Hi! There are many ways, depending on whether you want the database to handle it, or you want your application to handle it. What you want is a UNIQUE index on surname_original and name_original. Assuming the table already exists: ALTER TABLE names ADD UNIQUE(name_original,

Re: Duplicate combination

2003-12-14 Thread Ivan Cukic (Foment)
fr0g wrote: I have a table with peoples names in 3 different languages. Fields are like: id, surname_english, name_english, surname_original, name_original, surname_greek, name_greek. What I want is to check if a person has been entered twice in that table. You can create unique index on (surname_

Re: Duplicate combination

2003-12-14 Thread Chris Nolan
Hi! There are many ways, depending on whether you want the database to handle it, or you want your application to handle it. What you want is a UNIQUE index on surname_original and name_original. Assuming the table already exists: ALTER TABLE names ADD UNIQUE(name_original,surname_original);

Re: Duplicate combination

2003-12-14 Thread Aleksandar Bradaric
Hi, > I have a table with peoples names in 3 different languages. > Fields are like: id, surname_english, name_english, surname_original, > name_original, surname_greek, name_greek. > What I want is to check if a person has been entered twice in that table. > The key is ID but I can't have any oth

Duplicate combination

2003-12-14 Thread fr0g
I have a table with peoples names in 3 different languages. Fields are like: id, surname_english, name_english, surname_original, name_original, surname_greek, name_greek. What I want is to check if a person has been entered twice in that table. The key is ID but I can't have any other field uniqu