Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 random autonumber in SQL 7.0?

Author  Topic 

blake
Starting Member

29 Posts

Posted - 2000-11-27 : 13:33:42
I am porting a database from Access to SQL Server 7.0 and need to preserve Access's random autonumber field -- 4 byte number, randomly generated, guaranteed to be unique.

I can't use GUIDs as they are 16 bytes. Any ideas? Is there a way to directly implement this or am I looking at writing a trigger to create a random value, check for uniqueness, repeat until unique, update table?

   

- Advertisement -