Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to populate PK automatically from Stored Procedure
Message
From
14/10/2002 11:42:58
 
 
General information
Forum:
Microsoft SQL Server
Category:
Stored procedures, Triggers, UDFs
Miscellaneous
Thread ID:
00704506
Message ID:
00710942
Views:
15
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
Michael Levy
MCSD, MCDBA
ma_levy@hotmail.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform