From: "Sarcar, Shourya C (GE Healthcare)" Date: 2008-11-12T23:51:07+09:00 Subject: Re: Convert text string i.e 'Peter' into integer ID You need to generate a SHA1 or MD5 hash from your string. require 'digest/md5' d = Digest::MD5.new d.update("if you believe it, they have put a man on the moon") uniq = d.hexdigest > -----Original Message----- > From: ohlhaver@gmail.com [mailto:ohlhaver@gmail.com] > > Thanks for your help. No I need to turn the string which > would usually be a headline ('Man lands on the moon') into a > unique number. The purpose is to speed up my database queries > when checking whether an entry with the same headline already > exists in the db. > Justus