Update返回信息处理

    IF @Action = '7'
    BEGIN
        UPDATE  dbo.ReservationDetails
        SET     StatusFlag = '7' ,
                ScreenFlag = '0' ,
                VisitDoctor = @Operator , 
                VisitTime = CASE WHEN VisitTime IS NOT NULL
                                 THEN VisitTime
                                 ELSE GETDATE()
                            END , 
                ModifyUserId = @Operator,
                ModifyDate = GETDATE()
        WHERE   ReservationDetailId = @ReservationDetailId;
        --受影响行数
            IF @@ROWCOUNT >0
            BEGIN    
            SELECT  1 AS MsgId ,
                     '更新标识成功!' AS Msg;
            RETURN;     
            END
            ELSE
            BEGIN
            SELECT  -1 AS MsgId ,
                     '更新标识数据异常!' AS Msg; 
            RETURN;
            END;   
    END;

 

posted @ 2019-03-06 10:35  蜗牛的礼物  阅读(171)  评论(0编辑  收藏  举报