************************************************************
SQL> select cast(systimestamp as time) from dual;
CAST(SYSTIMESTAMPASTIME)
---------------------------------------------------------------------------
10.41.48 AM
************************************************************
*****************************************************************
SQL> create or replace FUNCTION test101 RETURN timestamp IS
2 v timestamp;
3 BEGIN
4 select cast(systimestamp as time) into v from dual;
5 END;
6 /
Warning: Function created with compilation errors.
SQL> show err
Errors for FUNCTION TEST101:
LINE/COL ERROR
-------- -----------------------------------------------------------------
4/3 PL/SQL: SQL Statement ignored
4/10 PL/SQL: ORA-00932: inconsistent datatypes: expected NUMBER got
TIME
I find it rather annoying that you would post verbatim quotes here from people on other forums (and vice versa) with no credit implying that it were somehow your own work.
Yea, See this...
********************************************************************
SQL> select CURRENT_TIMESTAMP - TRUNC (CAST (CURRENT_TIMESTAMP AS DATE)) from dual;
SQL> create or replace FUNCTION test101 RETURN timestamp IS
2 v timestamp;
3 BEGIN
4 select CURRENT_TIMESTAMP - TRUNC (CAST (CURRENT_TIMESTAMP AS DATE)) into v from dual;
5 end;
6 /
Warning: Function created with compilation errors.
Bookmarks