Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to create a public synynom in oracle

990301Feb 11 2013 — edited Feb 12 2013
There is a schema say 'A' in which there is a package called 'B' in which this is a funtcion (below). In this function 'TIMESTMAP' is used which while compiling in 11g is giving error. I want to create a public synonym for TIMESTAMP. Can anyone please provide me the script for the same.
FUNCTION generate_random_number
Return Number
IS
l_seq_no VARCHA2(6)
l_sys_date CHAR(10)
BEGIN
SELECT LTRIM(TO_CHAR(TIMESTAMP.NEXTVAL,'000000'), ' ')
INTO l_seq_no
from DUAL;

SELECT TO_CHAR(SYSDATE, 'H24:MI:SS')
INTO l_sys_date
from DUAL
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 12 2013
Added on Feb 11 2013
13 comments
593 views