casting CHAR to VARCHAR2
431158Jun 27 2005 — edited Jun 27 2005Is it possible to type cast a CHAR variable to VARCHAR2 in Oracle 9i ?
var varchar2(20);
var1 char(20);
begin
var := cast(trim(var1) as varchar2);
end;
It says "expression is of wrong type"
Throw some light on this. Oracle 9i document says that the CASTing from char,varchar2 to char,varchar2 is allowed.
Thanks,
Sam