When we use the sybase database, we often use excel to read the content in excel and insert it into the sybase Database Table. During this process, ex
When we use the sybase database, we often use excel to read the content in excel and insert it into the sybase Database Table. During this process, ex
Abstract: when using the sybase database, we often use excel to read the content in excel and insert it into the sybase database table, in this process, there are often line breaks in excel (line breaks are not visible). After being imported to a table, there are often different errors caused by line breaks. So how can I quickly remove/x0a directly? First, how to collect/x0a, and then remove/x0a.
1. The cable has a/x0a or/X0A field.
Select * from xxxx where userid like '%
% '(A linefeed is included here)
2. Remove/x0a or/X0A
Assume that the data with id 12595 has a line break. The SQL statement is as follows:
Update xxxx set userid = (
Select str_replace (userid ,'
', Null) from xxxx where userid like' %
% 'And id = 12595
) Where id = 12595.
Idea: first query the value of the 12595 pair that should be userid, then use the str_replace function to replace the line break, and then update the data through update.