Tag: HID state failed repeatedly executed ALC check perform modify image
First, the problem description:
The field nvarchar type in the database holds the following data:
' 3.3x10 '
Second, the solution:
--Test Cases
CREATE TABLE #temp
(NAME NVARCHAR () null)
INSERT into #temp select Fecalcoliform from waterquality
SELECT * FROM #temp
Update #temp Set Name=replace (Name, ' ', '); ---1
Update #temp Set Name=replace (Name, ' ', '); ---2
Update #temp Set Name=replace (Name, ' ', '); ---3
Update #temp Set Name=replace (Name, ' ', '); ---4
-the results are valid.
--Practical Project Application
Update waterquality Set Fecalcoliform=replace (Fecalcoliform, ","); ---1
Update waterquality Set Fecalcoliform=replace (Fecalcoliform, ","); ---2
Update waterquality Set Fecalcoliform=replace (Fecalcoliform, ","); ---3
Update waterquality Set Fecalcoliform=replace (Fecalcoliform, ","); ---4
You may have a question why do the same things repeat??
A: "This thing looks the same, and it's actually different."
You need to copy the column completely, and then select All to see if the bump status is empty after them.
Then you can copy and modify the blank spaces that have not been modified successfully.
For example, copy out into single quotes to observe ' 2.0x10 ', then copy out its unique ', and then perform a modification.
Before modification:
After modification:
Third, failure experience:
1.trim method
Select LTrim (' 3.3x10 ')--remove the left space
Select RTrim (' 3.3x10 ')--remove the space on the right
Select LTrim (RTrim (' 3.3x10 '))--Remove the leading and trailing spaces
The results are valid.
But the real data is this ' 3.3x10 '
Select LTrim (RTrim (' 3.3x10 '))--Remove the leading and trailing spaces
The result is invalid.
Articles that have been referenced:
Https://zhidao.baidu.com/question/183968041.html
Https://www.cnblogs.com/TurboWay/p/5924445.html
SQL minus Spaces