XSLT存档  

不及格的程序员-八神

 查看分类:  ASP.NET XML/XSLT JavaScripT   我的MSN空间Blog
declare @iEquipmentID int, @ISort int, @cType varchar(32), @cBillCode nvarchar(32), @cOperator varchar(12)
    
    select @iEquipmentID = IDENT_CURRENT('tEqaEquiDetail');
    select @cOperator=cOperator from tEqaEquiDetail where iEquipmentID = @iEquipmentID
    set @ISort = 1
    set @cType = '新增'
    
    create table #temp
    (
        cValue varchar(1024) null
    )
    set @sql = 'insert into #temp(cValue) exec dbo.pSysGetCode '''','''',-1,-1,''cBillCode_change_eqa'''
    exec (@sql);
    select @cBillCode = cValue from #temp
    drop table #temp;
    
    if @@error != 0
    begin
        goto problem
    end
    
    insert into tEqaChange (iEquipmentID, ISort, cType, cBillCode, dBill, dCreate, cOperator)values
    (@iEquipmentID, @ISort, @cType, @cBillCode, GETDATE(), GETDATE(), @cOperator)
select *  from sys.dm_tran_locks where resource_type = 'OBJECT' and resource_database_id = (select DB_ID())
DBCC OPENTRAN; 反回结果
kill 360

 

posted on 2021-09-27 14:41  不及格的程序员-八神  阅读(29)  评论(0编辑  收藏  举报