Caused exception message is:ora-12704: Character Set mismatch

Source: Internet
Author: User

The problem is that when you combine the two result sets of a SELECT query with union ALL, the type of a field appears

is caused by an inconsistency with the type of the corresponding field.

Because the SQL is relatively long, one field is excluded. Finally found

Field Bizdate:select to_char (fbizdate, ' Yyyy-mm-dd hh24:mi:ss ') as bizdate---itself fbizdate is a datetime type character type

Field * * *: SELECT Snumber----Snumber does not know that its data type can be definitely a character but does not know whether it is char or varchar

The problem arises:


Select To_char (fbizdate, ' yyyy-mm-dd hh24:mi:ss ')


Select Snumber

Always thought Snumber was a character type, but it was a character type, but the character also had Char,varchar

So I made a mistake. Since the above is converted to char then the following fields must also convert to char i.e. to_char (snumber)

Suddenly discovering the database is really annoying.

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: 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.