How to delete the special symbols in the table data
Asked by: Brian202 viewsITSeptember 3, 2018
For example 2017-01-01 Put - Delete to 20170101, and delete every line Thank you! !
3 Answers
+5Votes
If the characters you want to capture are only in the forefront, it’s still relatively simple
I will give you a test
Create a test table
12345create table test( Content varchar(100)) insert into test values (‘IPHONE 5S <li><a herf=”></a></li>’ )insert into test values (‘htc<li><a herf=”></a></li>’)–I added another item to you Data
execution
1select SUBSTRING(content,1,CHARINDEX(‘<li>’,content)-1) from test
result
Carl Williams- September 4, 2018|
+7Votes
Table name table_name The name of the field to be operated field_name If you delete the value of the field, you can clear all the values: UPDATE table_name SET field_name = ”; If you delete the field (this field is from now on Nothing): ALTER TABLE table_name DROP COLUMN field_name;
Sarah Adams- September 5, 2018|
+8Votes
You should click on “Time Settings (Format)” on the toolbar and select “20170101” mode.
+5Votes
If the characters you want to capture are only in the forefront, it’s still relatively simple
I will give you a test
Create a test table
12345create table test( Content varchar(100)) insert into test values (‘IPHONE 5S <li><a herf=”></a></li>’ )insert into test values (‘htc<li><a herf=”></a></li>’)–I added another item to you Data
execution
1select SUBSTRING(content,1,CHARINDEX(‘<li>’,content)-1) from test
result
+7Votes
Table name table_name The name of the field to be operated field_name If you delete the value of the field, you can clear all the values: UPDATE table_name SET field_name = ”; If you delete the field (this field is from now on Nothing): ALTER TABLE table_name DROP COLUMN field_name;
+8Votes
You should click on “Time Settings (Format)” on the toolbar and select “20170101” mode.