MySQL Remove field whitespace

Source: Internet
Author: User
Tags file separator

Issue: Script execution is bulk inserted from CSV file, CSV file exists export nonstandard, cause field to insert into tab and space, and "

Requirement: Remove the specified character from the data field

Update TableName set column=replace (column,char(),");   // char (09) indicates that tab,09 is the ASCII value of tab // replace tab in table TableName with ' ', that is, remove

The remaining special characters are ASCII:

Decimal encoding (corresponding) abbreviation character (or function/explanation)0NUL (NULL) NULL character1SOH (start of headline) title starts2STX (start of text) body starts3ETX (end of text) body End4EOT (end of transmission) transfer End5ENQ (Enquiry) Request6ACK (acknowledge) receive notification7BEL (Bell) Bell8BS (BACKSPACE) backspace9HT (horizontal tab) Horizontal tabTenLF (NL line feed, new lines) newline key OneVT (Vertical tab) Vertical tab AFF (NP form feed, new page) page Feed key -CR (carriage return) Enter -So (ShiftOut ) without switching theSI (Shift inch) Enable Toggle -DLE Data Link Escape -DC1 (Device control1) Device Control 1 -DC2 (Device control2) Device Control 2 +DC3 (Device control3) Device Control 3 -DC4 (Device control4) Device Control 4 +NAK (negative acknowledge) refused to receive ASYN (Synchronous idle) synchronous idle atETB (end of trans. Block) transfer block ends -CAN (cancel) Cancel -EM (end of Medium) media interrupt -SUB (substitute) bench -ESC (Escape) Exchange code (overflow) -FS (fileseparator) File separator inGS (Group separator) group character -RS (Record separator) record separator toUS (unit separator) cell separators +Space Spaces -! the " * # $ $Panax Notoginseng% -& the ' + ( A ) the* ++ - , $- $ . -/ the [ the  the ]94^ the _ the `123 {124| the }126~

MySQL Remove field whitespace

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.