PLS-00382: expression is of wrong typeNote that PLS-00382 can be raised when you try assign a value that cannot be converted implicitly into the target data type, as in the following example:
declareSee the following Oracle 10G document about allowed implicit conversions, where, for some reason, the implicit conversion between timestamps and dates is not mentioned and the new 11G document doesn't include it either, but is indeed perfectly working:
b timestamp := systimestamp;
a := b;
ORA-06550: line 5, column 8:
PLS-00382: expression is of wrong type
ORA-06550: line 5, column 3:
PL/SQL: Statement ignored
06550. 00000 - "line %s, column %s:\n%s"
*Cause: Usually a PL/SQL compilation error.
b TIMESTAMP WITH TIME ZONE := systimestamp;
a := b;
09-JAN-08 02.37.02.339176 PM +01:00
However you should always avoid using implicit conversions as they are affected by the server and client locale settings and a program that works in your environment may stop working altogether when executed from another client.