Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/sql-server/26.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
请帮助将sql字符串a.3.1转换为(a)。(3)。(1)_Sql_Sql Server_Sql Server 2008_Reporting Services_Ssrs 2008 R2 - Fatal编程技术网

请帮助将sql字符串a.3.1转换为(a)。(3)。(1)

请帮助将sql字符串a.3.1转换为(a)。(3)。(1),sql,sql-server,sql-server-2008,reporting-services,ssrs-2008-r2,Sql,Sql Server,Sql Server 2008,Reporting Services,Ssrs 2008 R2,我需要帮助向字符串中的每个字符/数字添加和。从绳子上。 例如,我需要将字符串a.3.1转换为a.3.1 我正在使用SQLServer2008R2 提前感谢。只需一个函数就可以了 更换所有的零件。具有然后分别在字符串的开头和结尾追加和插入括号 select '(' + Replace('a.3.1', '.' , ').(') + ')' 只需要一个函数就可以了 更换所有的零件。具有然后分别在字符串的开头和结尾追加和插入括号 select '(' + Replace('a.3.1', '.' ,

我需要帮助向字符串中的每个字符/数字添加和。从绳子上。 例如,我需要将字符串a.3.1转换为a.3.1

我正在使用SQLServer2008R2

提前感谢。

只需一个函数就可以了

更换所有的零件。具有然后分别在字符串的开头和结尾追加和插入括号

select '(' + Replace('a.3.1', '.' , ').(') + ')'
只需要一个函数就可以了

更换所有的零件。具有然后分别在字符串的开头和结尾追加和插入括号

select '(' + Replace('a.3.1', '.' , ').(') + ')'

这是我需要的,非常感谢你的快速回复。这是我需要的,非常感谢你的快速回复。