zoukankan      html  css  js  c++  java
  • 图文整理

    1.SQL 把表中字段存储的逗号隔开内容转换成列表形式http://www.cnblogs.com/lhmlyx2723356/p/4215496.html

    --SELECT *
    --FROM Table1;

    WITH T (
    Id
    ,pid
    ,token
    ,module
    ,precision
    ,precisions
    ,P1
    ,P2
    )
    AS (
    SELECT Id
    ,pid
    ,token
    ,module
    ,precision
    ,precisions
    ,charindex(' ', ' ' + keyword)
    ,charindex(' ', keyword + ' ') + 1
    FROM [Table1] --表名

    UNION ALL

    SELECT a.Id
    ,a.pid
    ,a.token
    ,a.module
    ,a.precision
    ,a.precisions
    ,b.P2
    ,charindex(' ', keyword + ' ', b.P2) + 1
    FROM [Table1] a --表名
    JOIN T b ON a.id = b.id
    WHERE charindex(' ', keyword + ' ', b.P2) > 0
    )
    SELECT a.id
    ,keyword = substring(a.keyword + ' ', b.P1, b.P2 - b.P1 - 1)
    ,a.pid
    ,a.token
    ,a.module
    ,a.precision
    ,a.precisions
    FROM [Table1] a --表名
    JOIN T b ON a.id = b.id
    ORDER BY id

  • 相关阅读:
    git相关整理
    cookie、sessionStorage和localStorage
    AJAX学习笔记
    json web token
    加密算法
    单点登陆
    给手机网络添加手动代理
    oracle数据库索引
    类加载器
    类加载过程
  • 原文地址:https://www.cnblogs.com/froid/p/5666703.html
Copyright © 2011-2022 走看看