no-duplicates

Is there a no-duplicate List implementation out there?

Hey all, I know about SortedSet, but in my case I need something that implements List, and not Set. So is there an implementation out there, in the API or elsewhere? It shouldn't be hard to implement myself, but I figured why not ask people here first? thanks, Yuval =8-) ...

Selecting with preference in SQL Server

I have a table in SQL Server 2000 with data similar to the following: ReferenceNumber ReferenceValue 00001 Not assigned 00002 Not assigned 00002 ABCDE in which each ReferenceNumber can appear multiple times in the table, either with a ReferenceValue of 'Not assigned' or a true ReferenceValue. ...

C# Check Object Array For Duplicates

I have an array of Customer[] objects, and I want to use it to create a Dictionary<Customer, string>. What is the easiest way to examine the array for duplicates before I load the Dictionary? I want to avoid "ArgumentException: An item with the same key has already been added". Thanks. ...

Removing Identical Objects in Ruby?

I am writing a Ruby app at the moment which is going to search twitter for various things. One of the problems I am going to face is shared results between searches in close proximity to each other time-wise. The results are returned in an array of objects each of which is a single tweet. I know of the Array.uniq method in ruby which ret...

Python mysql check for duplicate before insert

Hi here is the table CREATE TABLE IF NOT EXISTS kompas_url ( id BIGINT(20) NOT NULL AUTO_INCREMENT, url VARCHAR(1000), created_date datetime, modified_date datetime, PRIMARY KEY(id) ) I am trying to do INSERT to kompas_url table only if url is not exist yet any idea? thanks ...

how to exclude rows that have duplicates in one field

Hello I have a very simple task, but I cannot find any solution. I have two tables, 'articles' and 'categories' My article table look like this: id | cat_id | title | content 1 1 Blah Content 1 2 1 Blah2 Content 2 3 2 Blah3 Content 3 My categories table look like this: id | title 1 Catego...

Avoiding duplicate identifiers in the database

NOTICE: Appericiate all the answers, thanks but we already have a sequence.. and can't use the UNIQUE contraints because some items need to have duplicates.. I need to handle this using PLSQL somehow, so based on some criteria (using an if statement) i need to ensure there is no duplicates for that.. And just to confirm, these identifier...