I need to implement something like Oracle sequences in Sybase.  I
found a good article at: 

      http://www.isug.com/Sybase_FAQ/ASE/section6.2.html

There's only one problem.  All the sequence implementations listed
don't deal with long transactions.  Using these implementations I
would get dead-locks whenever two long transactions needed a sequence
for the same table.  

Has anybody solved this problem?

Or, does any body have the following article:

ISUG Technical Journal Online, 1st Quarter, 1998

     Another Kind of Surrogate Primary Key
            By Matt Townsend

This article by Matt Townsend supposedly contains a Sybase sequence
implementation that:

                "is based on the millisecond field of the
                date/time stamp. His solution guarantees
                uniqueness without any surrogate tables or 
                extra inserts/updates, and is a superior 
                performing solution to other methods described
                here (including Identities), but cannot
                support exact sequential numbers."

Thanks,

-Jim
-- 
<[EMAIL PROTECTED]> (Replace Z's with E's to reply)

TMTOWTDI

Reply via email to