zoukankan      html  css  js  c++  java
  • CHARINDEX函数

    CHARINDEX函数返回字符或者字符串在另一个字符串中的起始位置。
    CHARINDEX函数调用方法如下:
        CHARINDEX ( expression1 , expression2 [ , start_location ] )
        Expression1是要到expression2中寻找的字符中,start_location是CHARINDEX函数开始在expression2中找expression1的位置。
        CHARINDEX函数返回一个整数,返回的整数是要找的字符串在被找的字符串中的位置。假如CHARINDEX没有找到要找的字符串,那么函数整数“0”。
    示例:  

    1     --商品属性筛选表
    2     select pro_id,attrib_id2,attrib_nm2,attrib_id3,attrib_nm3,attrib_id4
    3     ,attrib_nm4,attrib_id5,attrib_nm5,attrib_id6,attrib_nm6,attrib_id7,attrib_nm7
    4     ,Custom7,lsg_date
    5     from dim_product_info
    6     where (CHARINDEX(pro_id,@pro_id)>0 or @pro_id=''); --款号
  • 相关阅读:
    angularjs $index用来取顺序
    angularjs &登录跳转
    if(!confirm("您确定删除吗?")){return;}
    登录跳转
    undefined null测试
    git生成密钥
    遍历map
    网络相关名词解释
    redis的Pub/Sub
    SQLAlchemy的使用
  • 原文地址:https://www.cnblogs.com/taohaijun/p/6617831.html
Copyright © 2011-2022 走看看