473,322 Members | 1,911 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

[IBM][CLI Driver][DB2/NT] SQL0245N The invocation of routine "TIMESTAMP" is ambiguou

Can anyone help with my embedded SQL in a old mainframe COBOL application that also runs on Windows. The SQL that is failing is a pretty standard SELECT and in the WHERE clause I am comparing some date/time columns in the selected rows with a timestamp of two COBOL host variables.

My SQL has been working for 10 years on various releases and still works just fine today on DB2 z/OS 10.1 and ok with SQL Server 2005 and 2008 and on Oracle 10g and 11g. But for some reason it just does not work on DB2 9.7 for Windows any more. Any ideas?

SELECT blah-blah where
timestamp(a.date_row_last_alt, a.time_row_last_alt)
> timestamp(:date-last-notified,:time-last-notified)

On DB2 9.7 I now get the following error:

[IBM][CLI Driver][DB2/NT] SQL0245N The invocation of routine "TIMESTAMP" is ambiguous. The argument in position "1" does not have a best fit. SQLSTATE=428F5

Any ideas why this is no longer supported?

I have also tried the following and they don't work either:

> timestamp(date(cast(:date-last-notified as char(10))),
time(cast(:time-last-notified as char(8))))

> timestamp(cast(:date-last-notified as char(10)),
:time-last-notified as char(8))
Mar 2 '11 #1
1 8143
vijay2082
112 100+
Hi Peter,

Need more details to confirm on exact issue. See below link for more information on the error and rectify accordingly. Still you have further issues then provide the exact input values with the error. db2level, db2set -all output will help more on this one.



See determining best fit from below link

http://publib.boulder.ibm.com/infoce.../r0000735.html

using Timestamp:

http://publib.boulder.ibm.com/infoce.../r0000859.html

Cheers, Vijay
Mar 6 '11 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: alederer | last post by:
Hallo! I have a table tstest(ts char(13) for bit data constraint a unique). This column is filled in a trigger with generate_unique(). In a application (CLI), I have the values of this...
1
by: Rudolf Bargholz | last post by:
Hi, We have created triggers to log modifications to tables in our application. The triggers work fine, just on one of the tables in our database the triggers fail with the error message...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.