• SQLBOT (3/1/2010)


    I also forgot to say that there is the NEWSEQUENTIALID() function if you're going to batch load.

    That should wreck your cluidx a little less, too.

    If NEWSEQUENTIALID() is the default value on a column, it would be great, but that's the only way to use it as it normally can't be generated on the fly. To get around that, a kluge someone taught me once is:

    create proc GenerateSequentialID

    as

    create table #temp_seqid (rowval uniqueidentifier default newsequentialid())

    insert into #temp_seqid default values

    select rowval from #temp_seqid

    go

    Gaby________________________________________________________________"In theory, theory and practice are the same. In practice, they are not." - Albert Einstein