Modifying Primary Key Values
From: ggeshev (ggeshev_at_tonegan.bg)
Date: 10/21/04
- Next message: Andy Reilly: "Re: Bug in SQL Server 2000?"
- Previous message: John Bell: "RE: Can I use a nested set?"
- Next in thread: Uri Dimant: "Re: Modifying Primary Key Values"
- Reply: Uri Dimant: "Re: Modifying Primary Key Values"
- Reply: Tibor Karaszi: "Re: Modifying Primary Key Values"
- Reply: David Portas: "RE: Modifying Primary Key Values"
- Reply: Hugo Kornelis: "Re: Modifying Primary Key Values"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 21 Oct 2004 10:30:25 +0300
Hello!
Let's suppose I have a table MyTable (A INT PRIMARY KEY, B VARCHAR(20)).
I send an UPDATE script to sql server.
In this script I modify the A column /the primary key/.
In an AFTER UPDATE TRIGGER I would like by analyzing "inserted" and
"deleted" virtual tables to understand which row from "inserted"
corresponds to which row in "deleted".
You understand that I cannot rely for that purpose on the A column /the
primary key/ because values in it are changed.
How can I make the true correspondence between "new" and "old" rows?
Thank you!
- Next message: Andy Reilly: "Re: Bug in SQL Server 2000?"
- Previous message: John Bell: "RE: Can I use a nested set?"
- Next in thread: Uri Dimant: "Re: Modifying Primary Key Values"
- Reply: Uri Dimant: "Re: Modifying Primary Key Values"
- Reply: Tibor Karaszi: "Re: Modifying Primary Key Values"
- Reply: David Portas: "RE: Modifying Primary Key Values"
- Reply: Hugo Kornelis: "Re: Modifying Primary Key Values"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|