Comment: Re: Generating Table IDs in T-SQL - Version 2
fiogf49gjkf0d hello Jason,
thanks for the great article. I think I have the code and the SP working ok , but how can I capture the output? When calling
declare @NEXTID varchar(10)
exec Saleslogix_demo.dbo.usp_GetNextSLX_ID 'Salesorder', @NextID OUTPUT
I do get the next id to the console but I want to use that id in something like
declare @NEXTID varchar(10)
exec Saleslogix_demo.dbo.usp_GetNextSLX_ID 'Salesorder', @NextID OUTPUT
insert into Saleslogix_demo.sysdba.SALESORDER
(salesorderid,ACCOUNTID,..yada yada )
SELECT @NEXTID,...ect
from salesales order
thanks much
mark
Author: Mark Hallberg - 2/28/2012
|