Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ORA8.TO_CHAR function in DB2

101 views
Skip to first unread message

Praveen

unread,
Feb 25, 2004, 1:59:22 AM2/25/04
to
Hi All,

I have some procedures which written in Oracle. Now the requirement
has come to convert those procedures into db2. I used IBM provided MTK
tool to convert the procedures. The tool has given the syntax for
TO_DATE function. When i tried to execute in db2 command line prompt,
it says an error...

db2 => select ORA8.TO_DATE(ORA8.TO_CHAR(CURRENT TIMESTAMP ,
'mm-dd-yyyy'), 'mm-d
d-yyyy') + 14 DAYS from sysibm.sysdummy1@
SQL0440N No authorized routine named "TO_CHAR" of type "FUNCTION"
having
compatible arguments was found. SQLSTATE=42884

db2 => select ora8.to_number('10') from sysibm.sysdummy1@
SQL0440N No authorized routine named "TO_NUMBER" of type "FUNCTION"
having
compatible arguments was found. SQLSTATE=42884

I'm using window IBM DB2 V8.1 UDB.

Can anyone tell what the problem is?

Thanks in Advance,
Praveen

Anton Versteeg

unread,
Feb 25, 2004, 3:24:42 AM2/25/04
to
In DB2 you just do a: current date + 14 days
Gee, I am glad we don't have that ridiculous oracle date/time stuff here.

Praveen wrote:

--
Anton Versteeg
IBM Certified DB2 Specialist
IBM Netherlands


PM (pm3iinc-nospam)

unread,
Feb 25, 2004, 8:41:26 AM2/25/04
to
Most likely, MTK will catalog some routines as part of it's install.
Can you find the routines in another schema?

In v8, you should have those TO_* routines as part of SYSIBM schema, not
ora8.
Should be in default function path.
db2 values current function path

PM

"Praveen" <sprave...@yahoo.com> a écrit dans le message de
news:98d8ec76.04022...@posting.google.com...

Serge Rielau

unread,
Feb 25, 2004, 8:35:12 AM2/25/04
to
Indeed, in my experience the translation of DATETIME from Oracle to DATE
or TIMESTAMP, is the easiest emulation induced bloat to fix.
For those transalating DATETIME to TIMESTAMP(which seems to be MTK's
preferred - since no-loss - route) instead of DATE I can recomment
TIMESTAMP_ISO().

But to address the original question: Do any of the ORA8 functions work
for you? Could be you simply haven't deployed the 'library'.

Remember that you can also send notes to m...@us.ibm.com if you get stuck.

Cheers
Serge
--
Serge Rielau
DB2 SQL Compiler Development
IBM Toronto Lab

0 new messages