Actually the issue here is the GO between the insert and the select @@identity.
Using go between them makes them in to two separate unrelated batches. Steve -----Original Message----- From: C. Hatton Humphrey [mailto:[email protected]] Sent: Tuesday, May 27, 2014 1:39 PM To: cf-talk Subject: Re: not getting identity value from insert On Tue, May 27, 2014 at 1:34 PM, Matthew Smith <[email protected]>wrote: > SELECT @@IDENTITY AS 'Identity' You might try using IDENT_CURRENT('#request.sqlobjectprefix# TblEmailRecovery') http://msdn.microsoft.com/en-us/library/ms175098.aspx Otherwise, what are you looking for? Until Later! C. Hatton Humphrey http://www.eastcoastconservative.com Every cloud does have a silver lining. Sometimes you just have to do some smelting to find it. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:358687 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

