• sybase创建存储过程


    create procedure P_mng_prize                                                                
       @ResultCode     char(1)  out,                                                                     
       @ResultMsg      char(50) out,                                                                     
                                                                                                         
       @action_id      varchar(30),                                                                      
       @operator_id    char(6),                                                                          
                                                                                                         
         @prize_id      char(4)      ,
         @store_id      char(15)                                                         
    as                                                                                                   
    declare @xcount int                                                                                  
    declare @logmsg varchar(250)           
    declare @tmpPrize_id char(4)            
    declare @today char(8)       
    declare @tmpStatus char(1)                           
    begin                                                                                                
                                                                                                                                                                                                     
        select @ResultCode = '1'                                                                         
        select @ResultMsg  = "不支持的操作:" + @action_id                                                
        select @today = convert(char(8),getdate(),112)                                                                    
                                                                                                         
        if( @action_id = 'add_commit')                                                                   
        begin                                                                                                       
            insert into prize__store
            (prize_id,store_id)
            values( @prize_id, @store_id)
                                                                                                         
            if (@@sqlstatus = 1)                                                                         
            begin                                                                                        
                select @ResultCode = '1'                                                                 
                select @ResultMsg  = "增加失败!"                                                         
            end                                                                                          
            else                                                                                         
            begin                                                                                         
                select @ResultCode = '0'                                                                 
                select @ResultMsg  = "增加成功!"                                                         
            end                                                                                          
        end                                                                                              
                                                                                                         
        if( @action_id = 'update_commit')                                                                
        begin                                                      
            select @ResultCode = '1'                                                                   
            select @ResultMsg  = "不允许删除!"                                                          
        end                                                                                              
                                                                                                         
        if( @action_id = 'delete')                                                                       
        begin                           
              delete prize_store
              where  prize_id = @prize_id
                                                                                
            if (@@sqlstatus = 1)                                                                         
            begin                                                                                        
                select @ResultCode = '1'                                                                 
                select @ResultMsg  = "增加失败!"                                                         
            end                                                                                          
            else                                                                                         
            begin                                                                                         
                select @ResultCode = '0'                                                                 
                select @ResultMsg  = "增加成功!"                                                         
            end                                                                               
        end                                                                                                               
                                                                                                         
        select @logmsg = "日志:"+@action_id+" id: "+@prize_id +" rst:"+ @ResultMsg                   
                                                                                                         
        insert into SYSROCORDLOG(OPER,OPTYPE,OPTIME,DISCRIBE) values(@operator_id,'01',getdate(),@logmsg)      
                                                                                                         
        return 0                                                                                         
    end
    go

  • 相关阅读:
    python 多进程下的日志打印
    卷积神经网络思考点,卷积网络就是很多个小分类器构建的网络
    ShuffleNetV1 paper reading
    find,grep,mv 组合使用,对大量数据切割方便
    常用的开源协议
    python3 日志重复打印logger
    pytorch clamp 与clamp_区别
    version GLIBCXX_3.4.21 not defined in file libstdc++.so.6 with link time reference
    pytorch,cuda8,torch.cuda.is_available return flase (ubuntu14)
    opencv remap 函数
  • 原文地址:https://www.cnblogs.com/yangxuming/p/6663650.html
Copyright © 2020-2023  润新知