[英]Remove spaces within a string: “00 00 0” = “00000” in SQL
I'm dealing with 2 tables which hold NI Numbers, one stores them as "00 00 00 00 0" the other 000000000", I need to group by and other checks based on the NI Number across both tables. 我正在处理2个保存NI编号的表,其中一个存储为“ 00 00 00 00 0”,另一个存储为000000000”,我需要根据两个表的NI编号进行分组和其他检查。
Is there a way to trim the internal spaces? 有没有办法修剪内部空间? Or split the others up?
还是拆分其他人?
where REPLACE(foo.NiNumberWithSpaces,' ','') = bar.NiNumberWithNoSpaces
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.