两个表里数组字段的映射关联(stuff ,charindex,for xml path)

    xiaoxiao2022-07-04  113

    两个表里数组字段的映射关联-http://help.finereport.com/doc-view-2173.html

     

    DECLARE @FullName       VARCHAR(100) DECLARE @Alias          VARCHAR(20)

    SET @FullName = 'Jeffcky, Wang' SET @Alias = ' "Superman555556" '

    SELECT STUFF(@FullName, CHARINDEX(',', @FullName), 1, @Alias) AS [FullName]//@fullname从第CHARINDEX(',', @FullName)位开始删除1位,并插入@alias

    select  CHARINDEX(',', @FullName) AS [FullName] //查询逗号在@fullname中的位置返回位数

    for xml path 

    https://www.cnblogs.com/LJP-JumpAndFly/p/3954162.html

    stuff 

    https://www.cnblogs.com/CreateMyself/p/9058380.html

    charindex

    https://www.cnblogs.com/qianxingdewoniu/p/6858580.html

    最新回复(0)