If this is your first visit, be sure to check out the FAQ by clicking the link above.
You may have to register before you can post: click the register link above to proceed.
To start viewing messages, select the forum that you want to visit from the selection below.
THERE IS NO SUCH STATEMENT WHICH TRIES TO SET THE VALUE of STR;
Is it something like parameter datatypes are not matching or something?
Also in DB2 whenever I write this,
Create Procedure TESTPROC(IN str VARCHAR,IN stro VARCHAR);
it also gives me error saying DB2ADMIN.VARCHAR is an undefined name. Any idea why this would occur?
The error -408 is for message SQL0408, which reads (according to the manual):
Quote:
SQL0408N A value is not compatible with the data type of its assignment
target. Target name is "<name>".
Explanation:
The data type of the value to be assigned to the column, parameter, SQL
variable, or transition variable by the SQL statement is incompatible
with the declared data type of the assignment target. Both must be:
* Numeric
* Character
* Graphic
* Dates or character
* Times or character
* Timestamps or character
* Datalinks
* The same distinct types
* Reference types where the target type of the value is a subtype of
the target type of the column.
* The same user-defined structured types. Or, the static type of the
value must be a subtype of the static type (declared type) of the
target. If a host variable is involved, the associated built-in type
of the host variable must be compatible with the parameter of the TO
SQL transform function defined in the transform group for the
statement.
The statement cannot be processed.
User response:
Examine the statement and possibly the target table or view to determine
the target data type. Ensure the variable, expression, or literal value
assigned has the proper data type for the assignment target. For a
user-defined structured type, also consider the parameter of the TO SQL
transform function defined in the transform group for the statement as
an assignment target.
sqlcode: -408
sqlstate: 42821
So you should check your stored procedure code where the problem may reside. Since you haven't shown us the code, we can't help you with that.
__________________
Knut Stolze
IBM DB2 Analytics Accelerator
IBM Germany Research & Development