ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Oracle Database date to ESQL function parameter input

Post new topic  Reply to topic
 Oracle Database date to ESQL function parameter input « View previous topic :: View next topic » 
Author Message
ajayrana
PostPosted: Thu Jul 17, 2014 12:02 pm    Post subject: Oracle Database date to ESQL function parameter input Reply with quote

Apprentice

Joined: 08 May 2014
Posts: 35

Hi All,

I have written a method in esql which accepts date as one of the parameters:
Code:

CREATE FUNCTION getLastInstallmentDate(IN piDate DATE,IN piMonths INTEGER) RETURNS DATE
BEGIN
   DECLARE lastInstallmentDate DATE;
   SET lastInstallmentDate = getFlowStartDate(piDate);
   SET lastInstallmentDate = lastInstallmentDate + CAST(piMonths AS INTERVAL MONTH);
   RETURN lastInstallmentDate;
END;


Now when i m trying to use this esql in the custom esql transformation mapping and connecting the date which i have selected from the Oracle databse, this gives me an error while i m executing the flow that the type of number 1 element is not correct.

Where as when i try to pass fn:current-date to the same method it works fine.

Am i missing something on the date conversion before passing it to the ESQL method..

Thanks & Regards
Ajay Rana
Back to top
View user's profile Send private message
Simbu
PostPosted: Thu Jul 17, 2014 2:17 pm    Post subject: Reply with quote

Master

Joined: 17 Jun 2011
Posts: 289
Location: Tamil Nadu, India

ESQL data type for Oracle DATE data type is wrong.
Please check the ESQL data type that is equivalent to Oracle DATE data type and use it accordingly.
http://www-01.ibm.com/support/knowledgecenter/SSMKHH_9.0.0/com.ibm.etools.mft.doc/ak05730_.htm
Back to top
View user's profile Send private message
ajayrana
PostPosted: Thu Jul 17, 2014 8:34 pm    Post subject: Reply with quote

Apprentice

Joined: 08 May 2014
Posts: 35

Hi Simbu,

Thanks for the quick reply !! Changing the datatype to timestamp in ESQL method solved the problem.

Thanks & Regards
Ajay Rana
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Oracle Database date to ESQL function parameter input
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.