With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.
ALTER PROCEDURE [dbo].[stU_GetIdentityFieldName] @tableName varchar(500), @identityFieldName varchar(500) output AS BEGIN set nocount on create table #identity (name varchar(1000)) --make sure this isn't a temp table if @tableName not like '[#]%' begin exec(' declare @name varchar(100) declare c cursor for select name from syscolumns where ID = object_ID(N''[' + @tableName + ']'') open c fetch next from c into @name while @@fetch_status = 0 begin if (select columnproperty(object_ID(N''[' + @tableName + ']''), @name, ''IsIdentity'')) = 1 insert #identity select @name fetch next from c into @name end close c deallocate c ') select @identityFieldName = name from #identity end else begin --if we have a temp table, we can't find it print('As of now, we know no way of determining a sure-fire way of finding an identity column on a temporary table.') end set nocount off end
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
|T-SQL: Trying to use a "NOT IN (Subquery)" in CASE Statement||2||30|
|Windows Server 2003 STD SP2 as a member server of 2016 domain||11||97|
|Using VBA and form selections to append an Access Table - And error 3134||4||16|
|Group ordersum by orderdate||3||23|
Join the community of 500,000 technology professionals and ask your questions.