标题:这段存储过程是什么意思 求详解
取消只看楼主
yjyuyu96
Rank: 1
等 级:新手上路
帖 子:15
专家分:0
注 册:2012-2-20
结帖率:85.71%
 问题点数:0 回复次数:0 
这段存储过程是什么意思 求详解
declare @PID INT
        declare @PtID INT
   
        declare @Num VARCHAR (10)
        select @Num = U_Num  from UserInfo where U_ID = @UID        
    if @BusiID =0
    BEGIN
        declare @BID INT
        select @BID = MAX(ID) +1 from dbo.Busi_Operate
        if @BID is null
        set @BID = 1
        set @PID = 0
        set @PtID = 0
        BEGIN tran
        exec Busi_Person_Save @PID out,@PersonName,@PersonSex,@PersonWork ,@Personnation
        ,@PersonPID,@PersonAge,@Personmail,@PersonAddress,@ProblemAddress ,@Persontel
        ,@PersonPhone,@IsSecret
        
        if @PID <=0
        BEGIN
            rollback tran
            select -1,'操作失败Busi_Person_Save'
            return -1
        END
        declare @mes VARCHAR (100)
        exec Busi_Petition_Save @PtID out ,@PetitionAim,@PetitionProblem,@PetitionUnionPerson
            ,@PetitionPersonNum ,@PetitionObjPerson ,@PetitionType ,@mes out
        if @PtID <=0
        BEGIN
            rollback tran
            select -2,'操作失败Busi_Petition_Save'+@mes
            return -2
        END            

在线等
搜索更多相关主题的帖子: null where 存储 
2012-03-29 15:37



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-364688-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.221481 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved