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 17:32:00
 
 
General information
Forum:
Microsoft SQL Server
Category:
Stored procedures, Triggers, UDFs
Miscellaneous
Thread ID:
00704506
Message ID:
00711140
Views:
20
>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.

So the app will go to this table to get the next ID for adding a new client or some other kind of activity? If so, why not just use an IDENTITY column in the table for the ID and include an OfficeID in each row that indicates ownership? Why play games with the IDs?

-Mike
Michael Levy
MCSD, MCDBA
ma_levy@hotmail.com
Previous
Reply
Map
View

Click here to load this message in the networking platform