Cause: The operation "<operator>" appearing within the SQL statement has a mixture of numeric and nonnumeric operands, or the operation operands are not compatible.
DataJoiner users: this data type violation can be at the data source or at DataJoiner.
Some DataJoiner data sources do not provide the appropriate values for "<operator>". In these cases the message token will have the following format: "<data source>:UNKNOWN", indicating that the actual value for the specified data source is unknown.
The statement cannot be processed.
Action: Check all operand data types to ensure that they are comparable and compatible with the statement usage.
If all the SQL statement operands are correct and accessing a view, check the data types of all the view operands.
DataJoiner users: if the reason is unknown, isolate the problem to the data source failing the request (see the Problem Determination Guide for procedures to follow to identify the failing data source) and examine the data type restrictions for that data source.
sqlcode: -401
sqlstate: 42818
Cause: A nonnumeric operand is specified for the arithmetic function or operator "<operator>".
The statement cannot be processed.
Action: Correct the SQL statement syntax so all specified function or operator operands are numeric.
DataJoiner users: if the reason is unknown, isolate the problem to the data source failing the request (see the Problem Determination Guide for procedures to follow to identify the failing data source) and examine the operators applied to that data source.
sqlcode: -402
sqlstate: 42819
Cause: The alias <name> has been defined upon:
The object <name2> is the undefined object. This object must exist before any SQL statement (other than CREATE ALIAS) can successfully use the newly created alias. The specified alias <name> is created.
An inoperative view is considered to be undefined for the purposes of creating an alias.
Action: Ensure that the undefined object <name2> is defined prior to using the newly created alias in an SQL statement (other than CREATE ALIAS).
sqlcode: +403
sqlstate: 01522
Cause: An INSERT or UPDATE statement specifies a value that is longer than the maximum-length string that can be stored in the column indicated.
The statement cannot be processed.
Note: | "<name>" may or may not be returned in SQLCA, depending on the INSERT or UPDATE statement syntax. |
Action: Check the length of the object column and correct the program or SQL statement so the insert or update string does not exceed the maximum length.
sqlcode: -404
sqlstate: 22001
Cause: The specified numeric literal is not in the acceptable range.
The proper ranges for SQL values are as follows:
In certain contexts the literal may have further restrictions that result in this error. For more information, look up the statement or clause in the SQL Reference.
DataJoiner users: this range violation can be at the data source or at DataJoiner. The proper ranges for SQL values located in data source tables depend on the data source. To determine the correct range, see the appropriate documentation for the data source. Some DataJoiner data sources do not provide the appropriate values for "<literal>". In these cases the message token will have the following format: "<data source>:UNKNOWN", indicating that the actual value for the specified data source is unknown.
The statement cannot be processed.
Action: Reduce the literal value to the appropriate size.
DataJoiner users: if the reason is unknown, isolate the problem to the data source failing the request (see the Problem Determination Guide for procedures to follow to identify the failing data source) and examine the data range restrictions for that data source.
sqlcode: -405
sqlstate: 42820
Cause: The value of a host variable or a numeric value calculated during processing of the UPDATE or INSERT SQL statement is outside the target column range. This problem may be caused by the values occurring in the object column, the SQL operation being performed on those values, or both.
The statement cannot be processed.
Action: See the explanation of message SQL0405 for ranges allowed for numeric data types.
NOTE: For system catalog updates, see the SQL Reference for valid ranges in various columns of updateable catalogs.
DataJoiner users: for the ranges of SQL data types, refer to the IBM DataJoiner Application Programming and SQL Reference Supplement.
sqlcode: -406
sqlstate: 22003
Cause: One of the following occurred:
DataJoiner users: this situation can be detected by DataJoiner or by the data source. Some DataJoiner data sources do not provide the appropriate values for "<name>". In these cases the message token will have the following format: "<data source>:UNKNOWN", indicating that the actual value for the specified data source is unknown.
The statement cannot be processed.
Note: | Under some circumstances, the token "<name>" may not be filled in (sqlerrmc field of the SQLCA not filled in). |
Action: Correct the SQL statement after examining the object table definition to determine which columns of the table have the NOT NULL attribute and do not have the WITH DEFAULT attribute.
DataJoiner users: if the reason is unknown, isolate the problem to the data source failing the request (see the Problem Determination Guide for procedures to follow to identify the failing data source) and examine the object definition for that data source. Remember that the defaults (NULL and NOT NULL) are not necessarily the same between data sources.
sqlcode: -407
sqlstate: 23502
Cause: The data type of the value to be inserted into or set in the column "<name>" by an INSERT, UPDATE, or SET transition-variable statement is incompatible with the declared data type of that column. Both must be:
The statement cannot be processed.
Action: Examine the current definition for the object table. Ensure the host variable or literal value assigned to the specified column is the proper data type.
sqlcode: -408
sqlstate: 42821
Cause: As specified in the SQL statement, the operand of the COUNT function does not conform to the rules of SQL syntax. Only COUNT(*) and COUNT(DISTINCT column) are allowed.
The statement cannot be processed.
Action: Specify COUNT(*) or COUNT(DISTINCT column).
NOTE: This message is only applicable to versions of DB2 prior to Version 2.
sqlcode: -409
sqlstate: 42607
Cause: The specified floating point literal is more than 30 characters in length, excluding leading zeros. A floating point literal has a maximum length of 30 characters.
The statement cannot be processed.
Action: Shorten the specified literal.
sqlcode: -410
sqlstate: 42820
Cause: In the context of the SQL statement, the subquery can have only one column specified in its SELECT clause.
The statement cannot be processed.
Action: Specify only one column in the SELECT clause of the subquery.
sqlcode: -412
sqlstate: 42823
Cause: During processing of the SQL statement, an overflow condition arose when converting from one numeric type to another. Numeric conversion is performed according to the standard rules of SQL.
DataJoiner users: numeric conversion can occur at DataJoiner, at data sources, or both.
The statement cannot be processed. No data was retrieved, updated, or deleted.
Action: Examine the syntax of the SQL statement to determine the cause of the error. If the problem is data-dependent, it may be necessary to examine the data processed at the time of the error.
DataJoiner users: if the reason is unknown, isolate the problem to the data source failing the request (see the Problem Determination Guide for procedures to follow to identify the failing data source) and examine the data range restrictions for that data source.
sqlcode: -413
sqlstate: 22003
Cause: There are various statements where this error may occur.
The columns are incompatible for one of the following reasons:
If the data type of a column is character, date, time, or timestamp the corresponding column may be a character string constant.
The statement cannot be processed.
Action: Correct the column names used in the SELECT statements or the expressions in the VALUES clause so that all corresponding columns are compatible types.
sqlcode: -415
sqlstate: 42825
Cause: One of the SELECT or VALUES statements connected by a set operator specifies a result column that is longer than 254 bytes. VARCHAR or VARGRAPHIC result columns longer than 254 bytes can be used only with the UNION ALL set operator.
The statement cannot be processed.
Action: Either use the UNION ALL operator instead of UNION, or remove the result columns longer than 254 bytes from the SELECT or VALUES statements.
sqlcode: -416
sqlstate: 42907
Cause: The statement string specified as the object of a PREPARE or EXECUTE IMMEDIATE contains a predicate or expression in which parameter markers have been used as operands of the same operator without a CAST specification. For example:
? > ?
The statement cannot be processed.
Action: This syntax is not supported. Use a CAST specification to give at least one of the parameter markers a data type.
sqlcode: -417
sqlstate: 42609
Cause: Untyped parameter markers cannot be used:
Parameter markers can never be used:
The statement cannot be processed.
Action: Correct the syntax of the statement. If untyped parameter markers are not allowed, use the CAST specification to give the parameter marker a data type.
sqlcode: -418
sqlstate: 42610
Cause: A specified decimal division is not valid because it will result in a negative scale.
The formula used internally to calculate the scale of the result for decimal division is:
Scale of result = 31 - np + ns - ds
where np is the precision of the numerator, ns is the scale of the numerator, and ds is the scale of the denominator.
DataJoiner users: the specified decimal division results in an invalid scale for that data source.
The statement cannot be processed.
Action: Examine and ensure the precision and scale of all columns that may participate in a decimal division. Note that an integer or small integer value may be converted to a decimal for this calculation.
DataJoiner users: if the reason is unknown, isolate the problem to the data source failing the request (see the Problem Determination Guide for procedures to follow to identify the failing data source) and examine the data range restrictions for that data source.
sqlcode: -419
sqlstate: 42911
Cause: The function "<function-name>" has a character string argument that contains a character that is not valid in a numeric SQL constant. The function may have been called as a result of using the CAST specification with "<function-name>" as the target data type. The function or data type used in the SQL statement may be a synonym for "<function-name>".
If a decimal character is specified in the DECIMAL function then that is the character that must be used in place of the default decimal character.
Action: Ensure that the character strings that are being converted to numeric types contain only characters that are valid in numeric SQL constants, using the decimal character, if specified.
sqlcode: -420
sqlstate: 22018
Cause: The operands of a set operator such as UNION, EXCEPT, or INTERSECT must have the same number of columns. The rows in a VALUES clause must have the same number of columns.
The statement cannot be processed.
Action: Change the SQL statement so each operand, or each row of a VALUES clause, has exactly the same number of columns.
sqlcode: -421
sqlstate: 42826
Cause: A locator variable is in error. Either it has not had a LOB value assigned to it, or the locator associated with the variable has been freed.
If "<variable-position>" is provided, it gives the ordinal position of the variable in error in the set of variables specified. Depending on when the error is detected, the database manager may not be able to determine "<variable-position>".
Instead of an ordinal position, "<variable-position>" may have the value "function-name RETURNS", which means that the locator value returned from the user-defined function identified by function-name is in error.
Action: Correct the program so that the LOB locator variables used in the SQL statement have valid LOB values before the statement is executed. A LOB value can be assigned to a locator variable by means of a SELECT INTO statement, a VALUES INTO statement, or a FETCH statement.
sqlcode: -423
sqlstate: 0F001
Cause: An application executing in a CONNECT TYPE 2 environment or Distributed Transaction Processing (DTP) environment such as CICS has attempted to execute an SQL dynamic COMMIT statement. The SQL dynamic COMMIT statement cannot be executed in this environment.
Action:
sqlcode: -426
sqlstate: 2D528
Cause: An application executing in a CONNECT TYPE 2 environment or Distributed Transaction Processing (DTP) environment such as CICS has attempted to execute an SQL dynamic ROLLBACK statement. The SQL dynamic ROLLBACK statement cannot be executed in this environment.
Action:
sqlcode: -427
sqlstate: 2D529
Cause: DISCONNECT will not be executed against a connection in the following cases:
Note that DISCONNECT ALL causes the DISCONNECT to be directed against all connections, so the request will fail if any of the connections violate the above restrictions.
Action: Possible actions:
sqlcode: -428
sqlstate: 25501
Cause: A maximum of 32,000 concurrent LOB locators per unit of work, is supported by DB2.
Action: Modify the program so that it requires fewer concurrent LOB locators and try again.
sqlcode: -429
sqlstate: 54028
Cause: An abnormal termination has occurred while the named UDF was in control.
Action: The UDF needs to be fixed. Contact the author of the UDF or your database administrator. Until it is fixed, the UDF should not be used.
sqlcode: -430
sqlstate: 38503
Cause: A user/client interrupt has occurred while the named UDF was in control.
Action: This could indicate some problem in the UDF, such as an infinite loop or wait. If the problem persists, (i.e. the need to interrupt results in the same error condition), then contact the author of the UDF or your database administrator. Until the problem is fixed, the UDF should not be used.
sqlcode: -431
sqlstate: 38504
Cause: A parameter marker in the statement has been determined as having the user-defined type "<udt-name>" based on the context in which it is used. A parameter marker cannot have a user-defined type as its data type unless it is part of an assignment (VALUES clause of INSERT or SET clause of UPDATE) or it is being explicitly cast to a user-defined distinct data type using the CAST specification.
The statement cannot be processed.
Action: Use an explicit cast to the user-defined distinct data type for the parameter marker or cast the columns that are user-defined distinct data types to their corresponding source data type.
sqlcode: -432
sqlstate: 42841
Cause: The value "<value>" required truncation by a system (built-in) cast or adjustment function, which was called to transform the value in some way. The truncation is not allowed where this value is used.
The value being transformed is one of the following:
The statement has failed.
Action: If "<value>" is a literal string in the SQL statement, it is too long for its intended use.
If "<value>" is not a literal string, examine the SQL statement to determine where the transformation is taking place. Either the input to the transformation is too long, or the target is too short.
Correct the problem and rerun the statement.
sqlcode: -433
sqlstate: 22001
Cause: The value that was specified for clause "<clause>" is not supported and has been replaced with the identified supported value "<value>".
Action: No change is required if the selected value is acceptable. Otherwise, specify a value that is valid for "<clause>".
sqlcode: +434
sqlstate: 01608
Cause: The SQLSTATE specified in the RAISE_ERROR function does not conform to the rules for an application defined SQLSTATE.
Action: Correct the SQLSTATE specified in the function RAISE_ERROR. The SQLSTATE must be a character string containing exactly 5 characters. It must be of type CHAR defined with a length of 5, or type VARCHAR defined with a length of 5 or greater. The SQLSTATE value must follow the rules for application-defined SQLSTATEs as follows:
sqlcode: -435
sqlstate: 428B3
Cause: The value of an input host variable code in the C programming language requires a NULL-terminator character at the end of the string.
The statement cannot be processed.
Action: Ensure that the value of the input host variable is terminated by the NULL-terminator character.
sqlcode: -436
sqlstate: 22024
Cause: The statement may achieve sub-optimal performance since the complexity of the query requires resources that are not available or optimization boundary conditions were encountered. The following is a list of reason codes:
The statement will be processed.
Action: One or more of the following:
sqlcode: +437
sqlstate: 01602
Cause: This error occurred as a result of execution of the RAISE_ERROR function or the SIGNAL SQLSTATE statement in a trigger.
Action: See application documentation.
sqlcode: -438
sqlstate: application-defined
Cause: The function "<function-name>" was referenced in the user's statement. However, because the SOURCE clause was used in the definition of this function, it has turned out that function "<source-function>" actually implements the function. (It may be a direct or an indirect definition path from "<function-name>" to "<source-function>".) At compile time, the encapsulator (DB2 code which acts on behalf of a function) for "<source-function>" has returned the error identified by "<sqlcode>".
Action: The actual error situation needs to be understood better before corrective action can be taken. Look up the explanation for "<sqlcode>". If "<source-function>" is a built-in function, the "<sqlcode>" should indicate the problem, as in the case where a built-in function is directly referenced in the user's statement. If "<source-function>" is a user defined function, the message most likely indicates a problem with one of the arguments or with the result from the function.
Correct the problem and try again.
sqlcode: -439
sqlstate: 428A0
Cause: This occurs in a reference to function "<function-name>", when the database manager cannot find a function it can use to implement the reference. There are several reasons why this could occur:
Action: Fix the problem and retry. This could involve catalog access, change to the statement, the addition of new functions, and/or change to the function path.
sqlcode: -440
sqlstate: 42884
Cause: The keyword DISTINCT was detected within the parentheses in a reference to function "<function-name>", and the function has been resolved as a scalar function. Use of the keyword DISTINCT with a scalar function is invalid.
Action: If a scalar function is being used, then remove the keyword DISTINCT. It is invalid for a scalar function.
If a column function is being used, then there is a problem with function resolution. Check your function path to see if the desired function is in one of the schemas, and also check the SYSFUNCTIONS catalog for the spelling of the function name and the number and types of parameters.
Correct the error and try again.
sqlcode: -441
sqlstate: 42601
Cause: Too many arguments were specified in the reference to function "<function-name>". The maximum allowable is 90.
Action: Correct the statement by ensuring that the correct number of arguments has been used and try again.
sqlcode: -442
sqlstate: 54023
Cause: An SQLSTATE of the form 38xxx was returned to DB2 by User Defined Function (UDF) "<function-name>" (specific name "<specific-name>"), along with message text "<text>".
Action: The user will need to understand the meaning of the error. See your Database Administrator, or the author of the UDF.
Errors that are detected by the IBM supplied functions in the SYSFUN schema all return the SQLSTATE 38552. The message text portion of the message is of the form:
SYSFUN:nn
where nn is a reason code meaning:
sqlcode: -443
sqlstate: 38xxx (the SQLSTATE returned by the UDF).
Cause: The DBMS is trying to access the body of the code that implements user defined function "<function-name>" (specific name "<specific-name>"), and cannot access it for the reason given by reason code "<code>" (the codes are listed below). The file implementing the function is identified by "<library-or-path>", and the function by "<function-code-id>".
(Note that these last two tokens may be truncated, due to limitations in the total token length which can be provided. If this happens, then the definition of the function in the catalogs may need to be accessed in order to determine the full library or path and function code id that were defined for the function.)
Action: Given for each reason code:
In addition to the above, this reason code can result if the UDF requires a shared library or DLL, and the shared library cannot be located (using the concatenation of directories specified in the LIBPATH environment variable in UNIX-based systems, the PATH environment variable in INTEL systems). There can be multiple levels of this indirection involved, leading to this reason code. For example UDF body X can be found, and it needs shared library Y which can also be found. But Y needs Z, and Z cannot be located, and this will result in SQL0444N reason code 4.
DataJoiner users: if this user defined function is strictly used to represent a remote user defined function (and thus no code is required to reside on DataJoiner), you may want to consider modifying the SQL statement or statistics to enable this function to be evaluated on the remote data source.
sqlcode: -444
sqlstate: 42724
Cause: The value "<value>" was truncated by a system (built-in) cast or adjustment function, which was called to transform the value in some way. This is a warning situation.
The value being transformed is the output of a user-defined function (UDF), and is being transformed because of a CAST FROM specification in the UDF definition, or because the UDF is sourced on another function and the result needed to be transformed.
Action: Ensure that the output is as expected and that the truncation has not caused any unexpected consequences.
sqlcode: +445
sqlstate: 01004
Cause: The "<clause>" keyword was included more than once in the statement. This is a warning condition.
Action: If the redundancy was intentional, or if it is determined that no harm has resulted, then no response is necessary. The type of "harm" alluded to could include, for example, the omission of some other desired keyword.
sqlcode: +447
sqlstate: 01589
Cause: Too many parameters were specified in the CREATE statement for function or procedure "<function-name>".
Action: Change the CREATE statement to include fewer parameters.
sqlcode: -448
sqlstate: 54023
Cause: An error was found in the EXTERNAL NAME clause of the CREATE statement for user defined function (UDF) or stored procedure "<function-name>". The rules for the library/function identification are as follows:
The name takes the form '<a>!<b>' or '<a>'. No blanks are permitted within the single quotes. <a> is one of the following:
If <b> is omitted, the default is the entry point defined when the named file was linked. If <b> is present, it identifies the entry point (function) within <a> that will be invoked as the body of the UDF or stored procedure.
Action: Correct the problem and try again. A possible cause is the inclusion of a blank, or having the '!' at the beginning or end of the name.
sqlcode: -449
sqlstate: 42878
Cause: Upon return from user-defined function (UDF) "<function-name>" (specific name "<specific-name>"), DB2 has detected that more bytes were returned than were allocated for one of the following:
The definition of the result argument in the UDF must conform to the requirement for the data type. Refer to the Embedded SQL Programming Guide for more information.
This is not permitted.
Action: See your Database Administrator, or the author of the UDF.
sqlcode: -450
sqlstate: 39501
Cause: An error was made in the "<data-item>" part of the CREATE statement for the user defined function (UDF) "<function-name>". The user's CREATE statement contained the invalid type "<type>", or it contained a user defined type (UDT) which is based on the invalid type "<type>".
"<data-item>" is a token that identifies the area of the problem in the CREATE statement. For example, "PARAMETER 2" or "RETURNS" or "CAST FROM".
Action: Determine which situation has occurred, and take corrective action. Possible corrective actions include:
sqlcode: -451
sqlstate: 42815
Cause: An error was encountered attempting to access or while accessing the file referenced by the "nth" host variable, where n = "<variable-position>", for the reason given by "<reason-code>". <variable-position> is set to 0 if the host variable position could not be determined. The possible reason codes are as follows:
SQL_FILE_READ -read from an existing file SQL_FILE_CREATE -create a new file for write SQL_FILE_OVERWRITE -overwrite an existing file. If the file does not exist, create the file. SQL_FILE_APPEND -append to an existing file. If the file does not exist, create the file.
Action:
For reason code 01, correct the file name length, file name and/or path.
For reason code 02, specify a valid file option.
For reason code 03, ensure that the file specified exists before attempting to access the file.
For reason code 04, either delete the file if it is no longer required or specify a file name that does not currently exist.
For reason code 05, ensure that the user has access (correct file permissions) to the file.
For reason code 06, either use a different file or, if the file must be accessed, modify the application to ensure that the file is not accessed concurrently.
For reason code 07, delete unnecessary files to free up disk space or specify a file that resides on another drive/file system with sufficient disk space. Also, ensure that no operating system or user file size limits were reached. If your application code page uses a multibyte encoding scheme it is possible that only part of the last character was written, ensure that the file contains only fully formed characters.
For reason code 08, if a file is to be used for input, ensure that the file is not modified before the entire file has been read.
For reason code 09, correct all errors on the media where the file resides.
For reason code 10, ensure that the file contains valid multibyte characters based on the code page of the application or submit the request while running under the same code page as the contents of the file.
For reason code 11, ensure that character conversion support between the code page of the file, for example Japanese EUC, and the graphic code page of the application, for example UCS-2, is installed.
sqlcode: -452
sqlstate: 428A1
Cause: A problem casting the result of user defined function (UDF) "<function-name>" has been identified. The CAST FROM data type is not castable to the RETURNS data type, and it should be. See the SQL Reference for details on casting between data types.
Action: Change the RETURNS or CAST FROM clause so that the CAST FROM data type is castable to the RETURNS data type.
sqlcode: -453
sqlstate: 42880
Cause: The signature a function consists of the function name, the number of parameters defined for the function, and an ordered list of the types of the parameters (without regard to any parameters of the types).
The signature of a procedure consists of the procedure name and the number of parameters defined for the procedure (data types are not considered).
In this case, there is a function or procedure ("<function-name>") already in the schema having the same signature as the function or procedure being created.
The statement cannot be processed.
Action: Determine if the existing function or procedure already provides the functionality desired. If not, then the new function's or procedure's signature will have to be changed (e.g. change the function or procedure name).
sqlcode: -454
sqlstate: 42723
Cause: If the SPECIFIC name is specified as a two part name, the "<schema-name1>" portion must be the same as the "<schema-name2>" portion of the "<function-name>". Note that the "<schema-name2>" portion of "<function-name>" may have been specified directly or it may have defaulted to the authorization ID of the statement.
Action: Correct the statement and try again.
sqlcode: -455
sqlstate: 42882
Cause: The user has supplied an explicit SPECIFIC name "<specific-name>" in the CREATE statement for function or procedure "<function-name>", but this name already exists as the SPECIFIC name for a function or procedure in the schema.
Action: Choose a new SPECIFIC name and try again.
sqlcode: -456
sqlstate: 42710
Cause: The user-defined function or user-defined data type cannot be created because a specified name is reserved for use by the system. Names that cannot be used for function names, distinct type names, structured type names, or attribute names include:
"=","<",">",">=","<=","&=","&>",,"&<", "!=","!>","!<","<>", SOME, ANY, ALL, NOT, AND, OR, BETWEEN, NULL, LIKE, EXISTS, IN, UNIQUE, OVERLAPS, SIMILAR, and MATCH.
Action: Select a name for the function, user-defined data type, or structured data type attribute that is not reserved for system use.
sqlcode: -457
sqlstate: 42939
Cause: In a reference to function or stored procedure "<function-name>" by signature, no matching function or stored procedure could be found. If a data type is used that can accept a parameter (e.g. CHAR(12)), then the type parameter is optional, i.e. you can specify the parameter (CHAR(12) or omit it (CHAR()). If you specify the parameter, then the DBMS will only accept an exact match on the data type AND the data type parameter. If you omit the parameter, then the DBMS will accept a match on data type only. The CHAR() syntax provides a way to say "don't care about data type parameters in finding a matching function".
Note also that in the DROP FUNCTION/PROCEDURE and COMMENT ON FUNCTION/PROCEDURE statements, an unqualified reference is qualified with the statement authorization ID, and this is the schema where the problem can be found. In the SOURCE clause of a CREATE function, the qualification comes from the current function path. In this case, there is no matching function in the entire path.
A function cannot be sourced on the COALESCE, NULLIF, NODENUMBER, PARTITION, TYPE_ID, TYPE_NAME, TYPE_SCHEMA, or VALUE built-in functions.
The statement cannot be processed.
Action: Possible responses include:
sqlcode: -458
sqlstate: 42883
Cause: The statement contains a CAST with the first operand having a data type of "<source-data-type>" to be cast to the data type "<target-data-type>". This cast is not supported.
Action: Change the data type of either the source or target so that the cast is supported. For predefined data types these are documented in the SQL Reference. For a cast involving a user-defined distinct type, the cast can be between the base data type and the user-defined distinct type or from a data type that is promotable to the base data type to the user-defined distinct type.
sqlcode: -461
sqlstate: 42846
Cause: An SQLSTATE of the form 01Hxx was returned to DB2 by user defined function (UDF) "<function-name>" (with specific name "<specific-name>"), along with message text "<text>".
Action: The user will need to understand the meaning of the warning. See your database administrator, or the author of the UDF.
sqlcode: +462
sqlstate: 01Hxx
Cause: The valid SQLSTATEs that a user defined function (UDF) can return are 38xxx (error), 38502 (error) and 01Hxx (warning). This user defined function "<function-name>" (specific name "<specific-name>") returned an invalid SQLSTATE "<state>", along with message text "<text>". The UDF is in error.
Action: The UDF will need to be corrected. See your database administrator, or the author of the UDF. The application significance of the bad SQLSTATE can also be learned from the UDF author.
sqlcode: -463
sqlstate: 39001
Cause: There is a system related problem involved with the running of a fenced mode UDF (User Defined Function). The exact nature of the problem is indicated by "<code>". This is NOT a user problem. Possible reason codes are:
UDF process errors
Agent process errors
Action: Contact your Database or System administrator.
sqlcode: -465
sqlstate: 58032
Cause: This message is returned as a result of issuing a CALL SQL statement. It indicates that the stored procedure associated with the CALL SQL statement has one or more result sets associated with it.
Action: None required.
sqlcode: +466
sqlstate: 01610
Cause: This message is returned as a result of closing a cursor. It indicates that another result set exists for a stored procedure.
Action: None required.
sqlcode: +467
sqlstate: 01611
Cause: The name of a data type to be created has an unqualified name that is the same as a system-predefined data type or is BOOLEAN. This is not allowed. Adding delimiters does not make the name valid.
The statement could not be processed.
Action: Correct the statement to use another identifier.
sqlcode: -473
sqlstate: 42918
Cause: In order for the CREATE of a sourced user defined function (UDF) to be valid, the result type ("<type-1>") of the source function must be castable to the RETURNS type ("<type-2>") of the function being created. There is no supported cast between these data types. See the SQL Reference for details on casting between data types.
Action: Change the RETURNS data type or the SOURCE function identification so that the result type of the SOURCE function is castable to the RETURNS data type.
sqlcode: -475
sqlstate: 42866
Cause: References to a function or stored procedure without a signature is permitted, but the named function or store procedure "<function-name>" must be unique in its schema and is not.
Note that in the DROP FUNCTION/PROCEDURE and COMMENT ON FUNCTION/PROCEDURE statements, an unqualified reference is qualified with the statement authorization ID, and this is the schema where the problem can be found. In the SOURCE clause of a CREATE FUNCTION, the qualification comes from the current function path. In this case, the first schema in the path containing a function with this name had other functions by the same name.
DataJoiner users: if the statement is a CREATE FUNCTION MAPPING statement, this error indicates that an attempt was made to create a function mapping from one remote function to more than one local function.
Action: Correct the reference by one of the following:
and try again.
sqlcode: -476
sqlstate: 42725
Cause: The base object, which is an object of type "<object-type1>" cannot be dropped because another object depends on it. There is a restrict dependency defined with objects of type "<object-type2>" (of which object "<object-name>" is an example).
It may be that the dependency is indirect. That is, the named object is dependent on another object which is dependent on the object being dropped.
For example:
- function F1 is sourced on function F2 - table V1 is defined using F1 - an attempt to drop F2 will fail due to the direct dependency of F1 on F2 and the indirect dependency of V1 on F2
Action: Either do not drop this object or drop the dependent objects first.
sqlcode: -478
sqlstate: 42893
Cause: The following types of nesting are not allowed within a GROUP BY clause:
where GEL represents the element shown as grouping-expression-list in the syntax diagram of the GROUP BY clause.
In some instances the value "---" will be shown for "<element 2>". In this case "---" represents one of CUBE, ROLLUP, GROUPING SET, or GEL.
The statement cannot be processed.
Action: Modify the GROUP BY clause to remove the nesting.
sqlcode: -481
sqlstate: 428B0
Cause: An attempt is being made to CREATE a user defined function "<function-name>" which is sourced on another function. One of the following situations has been identified:
Action: The number of parameters for the SOURCE function and for the function being created must be the same. The identification of the SOURCE function needs to be changed, to
sqlcode: -483
sqlstate: 42885
Cause: One or more of the data types in the statement is BOOLEAN. This is not supported in the current version of DB2.
Action: Change the data type(s) then resubmit the statement.
sqlcode: -486
sqlstate: 42991
Cause: The program used to implement the body of a user defined function is not allowed to execute SQL statements. This user defined function "<function-name>" (specific name "<specific-name>") contains SQL statements.
Action: Remove any SQL statements then recompile the program.
sqlcode: -487
sqlstate: 38502
Cause: The function "<function-name>" is defined for use as a predicate, returning a boolean result. Such a result is not valid in a select list.
The statement cannot be processed.
Action: Correct the function name or remove the use of the function.
sqlcode: -489
sqlstate: 42844
Cause: A required clause is missing in the CREATE for function "<function-name>". If EXTERNAL was specified, the following must also be specified: LANGUAGE, PARAMETER STYLE, VARIANT or NOT VARIANT, NO SQL, and EXTERNAL ACTION or NO EXTERNAL ACTION.
Action: Add the missing clause, then try again.
sqlcode: -491
sqlstate: 42601
Cause: The parameter in position "<number>" of function "<function-name>" is in error and the CREATE cannot be performed. The parameter in position "<number>" of the source function is not castable to the corresponding parameter of the function being created.
Action: Possible corrections include:
sqlcode: -492
sqlstate: 42879
Cause: The body of user defined function (UDF) "<function-name>" (specific name "<specific-name>") has returned an invalid date, time or timestamp value.
An example of a syntactically invalid date value is '1994-12*25': the '*' should be a '-'. An example of a numerically invalid time value is '11.71.22': there is no 71st minute in the hour.
Action: The UDF needs fixing. See your DBA, or the author of the UDF.
sqlcode: -493
sqlstate: 22007
Cause: An attempt was made to assign a cursor to a result set but multiple cursors have been allocated for procedure "<procedure-name>".
Action: Determine if the target result set was previously assigned to a cursor. If multiple cursors have been allocated for procedure "<procedure-name>" ensure that only one cursor is used to process the result sets of a stored procedure.
sqlcode: -499
sqlstate: 24516