Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to populate PK automatically from Stored Procedure
Message
De
14/10/2002 12:51:50
 
 
À
14/10/2002 11:42:58
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Stored procedures, Triggers, UDFs
Divers
Thread ID:
00704506
Message ID:
00710984
Vues:
16
Hi Michael,

The SQL database is on a remote server and the offices are located in different locations and they use the same SQL database on the remote server. The shared Office Table has a row for each office with a field for the last transaction Id which will be incremented for each office transactions.

Thanks!!!
Roland
===========================================================================

>Can you provide more information regarding your application? Will all offices be using the same database or will each have their own and then replicate around?
>
>If everyone is using the same database, I'd use an IDENTITY value and include some kind of SiteID as another column in each row.
>
>-Mike
>
>>Hi Michael,
>>
>>I don't think that would ever happen with these offices since they have only had 27,000 transactions over the last ten years.
>>
>>You are right; why put a range limitation.
>>
>>But getting back to the question. What would be the proper way and coding to acccomplish this routine?
>>
>>Thanks!!!
>>Roland
>>
>>===========================================================================
>>>>I need to generate and retreive an unique Transaction_id (int field) for different offices; each office would start off with say 1000000001 for Office One and Office Two would start off with 2000000001; etc. The field would be in the Office Table, one row for each office.
>>>
>>>And what would you do when an office has used up all of the keys within it's range?
>>>
>>>-Mike
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform