zoukankan      html  css  js  c++  java
  • 存储过程

    if(exists(select * from sysobjects where xtype = 'P' and name = 'CCIVR_GetCusInfo'))
    begin
        drop procedure CCIVR_GetCusInfo
    end
    go
    create procedure CCIVR_GetCusInfo
    @ProductSN    varchar(50),--主机编号
    @CustomerID    varchar(50),--客户ID
    @CustomerPassword varchar(50),--客户密码
    @StationID varchar(50),--服务站ID
    @Phone varchar(50),--来电号码
    @MethodCode varchar(50),--方法Code
    @ServiceFlag varchar(50),--服务属性标签
    @CustomerLevel varchar(50), --客户级别
    @ResultMsg varchar(200) output--返回信息
    as
    begin
            select ec.CustomerID as CustomerID,c.CustomerID as UserID
            from BS_CustomerPhone cp
            inner join BS_Contactor c on cp.CustomerID = c.CustomerID
            inner join BS_EnterpriseCustomer ec on ec.CustomerID = c.ParentID
            where 
            (cp.FullPhone = SUBSTRING(@Phone,2,11) --Parameter
            and substring(cp.Phone,1,3) in ('013','014','015','018'))
            or (cp.AreaNo + cp.Phone = @Phone --Parameter
            and substring(cp.Phone,1,3) not in ('013','014','015','018'))
    
    end
    
     
  • 相关阅读:
    oracle修改字符编码
    oracle修改约束列
    oracle非空约束
    Linux修改字符集
    修改oracle字符集合
    word问题禁止宏
    增加修改表列
    oracle增加sequence
    增加 修改oracle约束条件
    oracle用户 密码永不过期
  • 原文地址:https://www.cnblogs.com/feifu/p/3078199.html
Copyright © 2011-2022 走看看