错误:“Incorrect string value: “xE9xA2’ for column “hue.desktop_document2’.search’ at row 1” (1366)”

"xE9xA2' in the error message is an incorrect string value and may not be parsed correctly in the default encoding format. This may be because the string contains characters or encodings that exceed the range allowed by the database column definition.
insert image description here

"Incorrect string value: “xE9xA2’ for column “hue.desktop_document2’.search’ at row 1” (1366)”

Checking sql
is mostly due to annotation problems
:
insert image description here

Note:
For completeness: Comments cannot cross parenthetical boundaries. When using comments inside parentheses, the start and end of the comment must be within the same pair of parentheses. For example:

SELECT * FROM table1 WHERE (column1 = 1 -- 这是一个注释) AND column2 = 2;

In the example above, the comment starts and ends within the same pair of brackets.

Avoid multi-line comments: Using multi-line comments inside parentheses is not supported, because multi-line comments cannot span multiple lines, and each line will be parsed as a separate statement. Therefore, only single-line comments should be used within parentheses. For example:

SELECT * FROM table1 WHERE (column1 = 1 -- 这是一行注释而不是多行注释
                           AND column2 = 2);

In the example above, the comment should only be a single-line comment, and not attempt to span multiple lines.

Do not nest brackets and comments: Brackets should not contain other brackets or comments. This is because the Hive SQL parser may not handle such nested structures correctly. For example:
- Incorrect usage, please avoid

SELECT * FROM table1 WHERE (column1 = 1 -- 这是一行注释 (包含嵌套括号)
                           AND column2 = 2);

In the example above, the nested parentheses and comments inside the parentheses can cause parse errors or syntax errors.

Guess you like

Origin blog.csdn.net/qq_43688472/article/details/132698402
Recommended