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(OR A8.TO_CHAR(CURR ENT TIMESTAMP ,
'mm-dd-yyyy'), 'mm-d
d-yyyy') + 14 DAYS from sysibm.sysdummy 1@
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.sysdummy 1@
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 3 18395
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: 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(OR A8.TO_CHAR(CURR ENT TIMESTAMP , 'mm-dd-yyyy'), 'mm-d d-yyyy') + 14 DAYS from sysibm.sysdummy 1@ 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.sysdummy 1@ 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
IBM Certified DB2 Specialist
IBM Netherlands
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" <sp**********@y ahoo.com> a écrit dans le message de
news:98******** *************** ***@posting.goo gle.com... 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(OR A8.TO_CHAR(CURR ENT TIMESTAMP , 'mm-dd-yyyy'), 'mm-d d-yyyy') + 14 DAYS from sysibm.sysdummy 1@ 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.sysdummy 1@ 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
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 mt*@us.ibm.com if you get stuck.
Cheers
Serge
--
Serge Rielau
DB2 SQL Compiler Development
IBM Toronto Lab This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Amin Schoeib |
last post by:
Hi,
Can somebody tell me why this query don't work when I use to_date
Instead of to_char
By using to_char:
select
to_char(last_day(cast(current_date - interval '1 month' as date)),'DD.MM.YYYY')
;
|
by: Mark Hansen |
last post by:
I'm trying to convert some schema creation scripts that were
used on MS SQL Server to DB2 (v8.2) and have a problem with
the following select statement (snippet) used for a view:
SELECT
col1,
col2,
timestamp-col1,
TO_CHAR(timestamp-col1, 'HH24')
FROM ...
|
by: gimme_this_gimme_that |
last post by:
What is the DB2 equivalent syntax of Oracle's :
select to_char(created_date,'MM/DD/YYYY') from foo
Thanks
|
by: Wei Wang |
last post by:
I get compile error for this code:
for i in 1..arg_count-1 LOOP
RAISE NOTICE quote_literal(to_char(i, ''9''));
END LOOP;
where arg_count = 3.
I tried RAISE NOTICE to_char(i, ''9''); as well.
|
by: Najib Abi Fadel |
last post by:
Hi, i am using PostgreSQL 7.3.2
there's a bug for the date '2005-03-27' !!!!!!!!!!!!!!!!!!!!!!!!!!!
SELECT to_char('2005-03-27'::date,'DD/MM/YYYY');
to_char
------------
26/03/2005
(1 row)
| |
by: Eitan M |
last post by:
Hello,
What is the equivalent function for : to_char (to_char is Oracle function)
in access ?
select to_char ( ...) from ...
Thanks :)
|
by: woodsc |
last post by:
Hi all,
I am trying to optimize the queries in my application. Is there a performance difference between (to_char(myDate,format) < myString) and (myDate < to_date(myString, format)).
ex. Select * from myTable where (to_char(fieldDate, 'MM/DD/YYY') <= queryDate )
or Select * from myTable where (fieldDate <= to_date(queryDate, 'MM/DD/YYYY') )
assuming fieldDate is a date or timestamp field and queryDate is '01/01/2007', a...
|
by: debasisdas |
last post by:
This function takes 2 dates as parameter and returns the number of working days. You need to add the list of holidays. (I have added a few as sample)
CREATE OR REPLACE FUNCTION BUSINESS_DAYS (
i_Date1 IN DATE,
i_Date2 IN DATE
)
RETURN NUMBER
IS
|
by: waraujobh |
last post by:
The Oracle function TO_CHAT accept DATE datatype. In DB2, i know that exist the VARCHAR_FORMAT function (synonym TO_CHAR), but this function only accepts TIMESTAMP datatypes.
How can i have the same result in DB2, like this SQL in Oracle:
SELECT to_char(data_entrada,'YYYYMM') FROM t1
Obs: data_entrada is of datatype DATE.
Thanks,
Wellerson
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |