zoukankan      html  css  js  c++  java
  • sql server 语句

    --create
    -- SQL去除回车符,换行符,空格和水平制表符
    create function RepSymbolChar(@str nvarchar(max))
    returns nvarchar(max)
    as
    begin
    
    set @str=LTRIM(@str)
    set @str=RTRIM(@str)
    set @str=replace(@str,char(9),'') --水平制表符
    set @str=replace(@str,char(10),'') -- 换行    
    set @str=replace(@str,char(13),'') --回车
    return @str 
    end
    go
    if exists(
    SELECT top 1 * FROM pointsection where Content like '%<p>%' and Content not like '%"math-tex"%'
    )
    begin 
    update pointsection set Content=dbo.RepP(Content) where Content like '%<p>%' and Content not like '%"math-tex"%'
    end
    --子查询更新
    select *,(select  content from pointsection0907 where id=p.id)as c from pointsection as p
    where Id in (select  Id from pointsection0907 where id=p.id and content like '%<p>%') and id=7863 
     
    
    --update pointsection set content=(select content from pointsection0907 where id=pointsection.id)
    --where Id in (select Id from pointsection0907 where id=pointsection.id and content like '%<p>%')
  • 相关阅读:
    node.js
    js中文乱码问题
    238. Product of Array Except Self
    接下来要记得东西
    javascript 块内函数
    171. Excel Sheet Column Number
    Moore’s Voting Algorithm
    [ Python ] PIL
    [ Python ] KMP Algorithms
    房之事
  • 原文地址:https://www.cnblogs.com/Hangle/p/5836293.html
Copyright © 2011-2022 走看看