[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Delete Duplicates

Amit Kulkarni

6/11/2008 6:39:00 AM

Hello Sir/Madam,
I want to know how can i delete duplicates entries from
database using rake task.

Regards,

Amit Kulkarni
--
Posted via http://www.ruby-....

3 Answers

Craig Demyanovich

6/11/2008 12:06:00 PM

0

I don't know of any built-in task that already does that. Thus, you'll have to:

* Figure out how to detect duplicates in your data.
* Write some code to detect and delete the duplicates.
* Write a rake task to call the code that you wrote in the previous step.
* Run the rake task.

Good luck,
Craig

Lloyd Linklater

6/11/2008 12:50:00 PM

0

Amit Kulkarni wrote:
> I want to know how can i delete duplicates entries from
> database using rake task.

I am not sure if you are asking to learn about rake tasks or database
cleanup. Assuming that the result is what matters, I suggest that you
apply a primary index to the fields you are checking. That will remove
duplicates automatically.

hth
--
Posted via http://www.ruby-....

Amit Kulkarni

6/12/2008 5:16:00 AM

0

Thankyou for your advice..if possible can u suggest me how to detect n
delete duplicates...

--
Posted via http://www.ruby-....