@@Identity is only for identity fields. I always generate my own GUID
locally and insert that along with the rest of the data. My guess is
that you are going to have to query based on the data that you just put
into the record (do you have a candidate key?) to get the id
Frank.
Frank Cazabon
On 17/10/2012 03:51 PM, MB Software Solutions, LLC wrote:
I insert a row into a table whose PK is a GUID that's automatically
generated. How do I get that GUID value afterwards? I thought it
would be SELECT @@IDENTITY but that just returns NULL and I can see on
a SELECT * FROM MyTABLE that it's not a null value.
tia,
--Mike
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[email protected]
** All postings, unless explicitly stated otherwise, are the opinions of the
author, and do not constitute legal or medical advice. This statement is added
to the messages for those lawyers who are too stupid to see the obvious.