Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Insert Trigger
Message
From
23/04/2003 12:55:29
 
 
General information
Forum:
Microsoft SQL Server
Category:
Other
Title:
Miscellaneous
Thread ID:
00780597
Message ID:
00780684
Views:
8
>> maybe I'm missing something?

Nope. You're not missing anything. You've got the tail wagging the dog. You need to get the record created so that you can get the IDENTITY value, but you can't get the record created because the PRIMARY KEY constraint is validated before the record is created.

Something's going to have to give.

He's my suggestion: make the PK an IDENTITY column and use the other value that you're trying to create a candidate key.

-Mike

>Thanks for your response Alexandre,
>
>The problem is that cCode_id is a primary key so when it tries to insert it will fail b/c it requires a value, or maybe I'm missing something?
Michael Levy
MCSD, MCDBA
ma_levy@hotmail.com
Previous
Reply
Map
View

Click here to load this message in the networking platform