When I select a function of systimestamp(1) into c7, all is well. When I assign c7 := a function of systimestamp(1) , I get an error PLS-000306. See code below:
PQRPSB01> l
1 declare c7 varchar2(9);
2 begin
3 select trim(to_char(systimestamp(1),‘hh24missff’)) into c7 from dual;
4 --c7 := trim(to_char(systimestamp(1),‘hh24missff’)) ;
5 dbms_output.put_line(c7);
6* end;
PQRPSB01> /
1609119
PL/SQL procedure successfully completed.
PQRPSB01> /
1609138
PL/SQL procedure successfully completed.
PQRPSB01> edit
Wrote file afiedt.buf
1 declare c7 varchar2(9);
2 begin
3 --select trim(to_char(systimestamp(1),‘hh24missff’)) into c7 from dual;
4 c7 := trim(to_char(systimestamp(1),‘hh24missff’)) ;
5 dbms_output.put_line(c7);
6* end;
PQRPSB01> /
c7 := trim(to_char(systimestamp(1),‘hh24missff’)) ;
*
ERROR at line 4:
ORA-06550: line 4, column 21:
PLS-00306: wrong number or types of arguments in call to ‘SYSTIMESTAMP’
ORA-06550: line 4, column 1:
PL/SQL: Statement ignored
PQRPSB01>
Can somebody explain why?
Thanks,
Carl