Home > database >  Oracle server got coredump a SELECT statement
Oracle server got coredump a SELECT statement

Time:10-05


SELECT the CAST (INTERVAL '1-1 during the MONTH AS CHAR (1000)) FROM DUAL;

After I checked the document, see the INTERVAL and character type can be an implicit conversion, display conversion using to_char () function is no problem, but using CAST out of the question... Oracle to the town is a big footprint

Curious what will appear such question? ~ ~

CodePudding user response:

SQL> SELECT the CAST (INTERVAL '1-1 during the MONTH AS CHAR (10)) FROM DUAL;
SELECT the CAST (INTERVAL '1-1 during the MONTH AS CHAR (10)) FROM DUAL
*
Line 1 error:
ORA - 25137: data values beyond the scope of the
SQL>

When the precision of the char is 10, the server will not core but report the error

CodePudding user response:

Uh, uh, no one?

CodePudding user response:

You this statement algorithm is especially big circulation use much CPU, perhaps I won't try province downtime

CodePudding user response:

reference 1st floor z601316152 response:
SQL> SELECT the CAST (INTERVAL '1-1 during the MONTH AS CHAR (10)) FROM DUAL;
SELECT the CAST (INTERVAL '1-1 during the MONTH AS CHAR (10)) FROM DUAL
*
Line 1 error:
ORA - 25137: data values beyond the scope of the
SQL>

When the precision of the char is 10, the server will not core but reported this error


In this way, he will only see the content inside as string output and the length of the string is 29 now, beyond the scope of course,
The char (10) for char (40), and see the results, to find regular

CodePudding user response:

Jdsnhan
reference 4 floor response:
Quote: refer to 1st floor z601316152 response:

SQL> SELECT the CAST (INTERVAL '1-1 during the MONTH AS CHAR (10)) FROM DUAL;
SELECT the CAST (INTERVAL '1-1 during the MONTH AS CHAR (10)) FROM DUAL
*
Line 1 error:
ORA - 25137: data values beyond the scope of the
SQL>

When the precision of the char is 10, the server will not core but reported this error


In this way, he will only see the content inside as string output and the length of the string is 29 now, beyond the scope of course,
The char (10) for char (40), and see the results, to find regular

Well but still don't understand why the char (1000) out of the question?
  • Related