> Coming out of left field here as I haven't read > everything but what about in your code getting a > random number, checking to make sure its not in > your table then insert it. Just run a loop.
That does work, however, it is also a performance hit. The performance hit dramatically increases as the size of the table increases. An int data type is 4-bytes. That means it can go up to ~4 millions rows. When you first start populating the table, it may pull a random number that is not in the database pretty quickly as the chance in getting a previously used number is 1 in 4 million. Once your table size increases to a million rows, your chance of hitting a previously used number becomes 1 in 4. One solution would be to use a bigint data type. It's an 8-byte integer that goes up to something like 9 quintillion (that's 9 with a lotta zeros). I don't believe this data type is available in SQL Server 7.0 and perhaps some other RDMBS' so there could be compatibility issues. Ben Johnson Hostworks, Inc. ______________________________________________________________________ This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/[email protected]/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

