Maintaining a unique/sequenced field

Maintaining a unique/sequenced field

Post by TVNST09LSU » Tue, 18 Jan 2005 19:27:05

So I get the idea not to use the autonumber field for anything meaningful.

But - how do I create a sequenced or unique field when I am dealing with

Seems random number generation would minimize the conflicts, but there is a
remote possiblity of a conflict, and giving a customer an invoice, location #
etc of 238982752398756 is cumbersome.

Sequencing poses a problem, since if I am tracking my numbers/increment, it
would be very easy to duplicate in a replication environment.

Could possibly suffix/prefix a sequence based upon which replica/master
being used, but this presents problems also.

Any ideas where I could keep invoice numbers in sequence while using
replicas where the replicas and masters are creating invoices???


1. Maintain Sequence fields after a mail merge

2. Unique key on 2 fields in which 1 is non unique under the first unique key

Hi ,
I want to create a unique field on 2 columns named (customer_id ,
is_default ).
but the problem I have in having this is in my customer table
customer_id field is unique and can have more than 4-5 values for
is_default field. hence if I want to create a unique key composed of
the above 2 keys then it would not happen as my same customer_id have
4-5 is_default values and I want them to be unique for each combination
in the table.....

so any suggestion with this are highly appreciated ....


3. Copy all data from a:Class A's fields to the namesake fields of b:Class B.

4. How do I maintain sequence in an Update Form?

5. How to maintain XML element sequence when serializing/deserializing using DataSet

6. Maintaining ordered sequence of msgs & individual records within m

7. Sort on first field, maintaining order of second field

8. Thoughts on maintaining a sequence order?

9. Maintain unique parameters

10. advice needed on maintaining large collections of unique ids

11. "lsort -unique" and maintaining ORDER

12. Maintaining a list of unique entries in a list

13. How to maintain unique aliases across multiple domains?

14. Restructuring column sequence to rows, based on a unique column.

15. Get next unique ID from a table before insert @@identity / Sequence