For developing an update-trigger i need a function to get the recordkey (value of the primary key from the trigger table) of the updated record. I know that there are two functions to get the recordkey of an inserted record (@@identity or ident_current). I need this function for an updated record.
So i tried to find another solution for my problem. I want to find out all the column(s) consists to the primary key of a table. In the next step i would get the recordkey of the updated table by selecting all primary-key-fields from the "inserted"-table (i mean inserted-table from update trigger).
But I cant get the field(s) consists to the primary key. I hoped that information are coded in dbo.sysindexes.keys but can't read out the field of type varbinary.
Thanks for your help!
Guido Greschuchna
Düsseldorf, Germany
So i tried to find another solution for my problem. I want to find out all the column(s) consists to the primary key of a table. In the next step i would get the recordkey of the updated table by selecting all primary-key-fields from the "inserted"-table (i mean inserted-table from update trigger).
But I cant get the field(s) consists to the primary key. I hoped that information are coded in dbo.sysindexes.keys but can't read out the field of type varbinary.
Thanks for your help!
Guido Greschuchna
Düsseldorf, Germany