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 » Inserting [b]DATE[/b] field into Oracle 8.1 using WBIMB

Post new topic  Reply to topic
 Inserting [b]DATE[/b] field into Oracle 8.1 using WBIMB « View previous topic :: View next topic » 
Author Message
biswagourab
PostPosted: Wed Jun 21, 2006 11:13 am    Post subject: Inserting [b]DATE[/b] field into Oracle 8.1 using WBIMB Reply with quote

Apprentice

Joined: 31 May 2005
Posts: 47
Location: London

Hi All,
I am trying to insert the date field into the Oracle DB using the compute node in WBIMB 6.0.
I am not able to do so and am getting this error

The correlation name ''to_date('20060620','YYYYMMDD')'' is not valid. Those in scope are: 'Environment, InputLocalEnvironment, OutputLocalEnvironment, InputRoot, InputBody, InputProperties, OutputRoot, InputExceptionList, OutputExceptionList, InputDestinationList, OutputDestinationList'.

It says the to_date function is not defined.

The command I am using is....

PASSTHRU('INSERT INTO Database.GEC_HFS_BBC.TBL_X_CUSTOMER_INFO(CUSTOMER_ID,PA_SSO_ID,LAST_EXTRACTED_DATE)
VALUES(?,?,?)', SUBSTRING(InputRoot.BLOB.BLOB FROM 1 FOR ,SUBSTRING(InputRoot.BLOB.BLOB FROM 9 FOR 10),to_date('20060620','YYYYMMDD') );

Please help me in getting to the root of this problem. I can insert using TOAD so the to_date is recognised by the Oracle DB.

I can render any other info if you want.

Thanks
Biswa
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
jefflowrey
PostPosted: Wed Jun 21, 2006 2:37 pm    Post subject: Re: Inserting [b]DATE[/b] field into Oracle 8.1 using WBIMB Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

biswagourab wrote:
PASSTHRU('INSERT INTO Database.GEC_HFS_BBC.TBL_X_CUSTOMER_INFO(CUSTOMER_ID,PA_SSO_ID,LAST_EXTRACTED_DATE)
VALUES(?,?,to_date(?,'YYYYMMDD'))', SUBSTRING(InputRoot.BLOB.BLOB FROM 1 FOR ,SUBSTRING(InputRoot.BLOB.BLOB FROM 9 FOR 10),'20060620' );


If you had sat down and really thought about what you were actually doing, you would have figured this out yourself.

Please remember what PASSTHRU does.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
biswagourab
PostPosted: Wed Jun 21, 2006 5:14 pm    Post subject: Reply with quote

Apprentice

Joined: 31 May 2005
Posts: 47
Location: London

Hi Jefflowrey,
You would be glad to know that I was going on the right path. I was trying VALUES(?,?,to_date('20060620','YYYYMMDD'))' hehe

But now the bad news. I tried the way you guided me to,but when i save the code, I get an error message saying that

Syntax Error : Valid options are , || / + = - * AND BETWEEN IS LIKE MINUTE MONTH OR SECOND YEAR

This error is at the position where i have marked the *

VALUES(?,?,to_date(?, * 'YYYYMMDD'))'

I dont seem to understand why I am getting this error, which actually I should not get since I am using the PASSTHRU.

The code looks exactly as you have given it to me.

Thanks
Biswa
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
biswagourab
PostPosted: Thu Jun 22, 2006 4:44 pm    Post subject: Inserting DATE field into Oracle 8.1 using WBIMB (solved) Reply with quote

Apprentice

Joined: 31 May 2005
Posts: 47
Location: London

Hi
the problem was finally solved when I used this syntax

PASSTHRU('INSERT INTO Database.GEC_HFS_BBC.TBL_X_CUSTOMER_INFO(CUSTOMER_ID,PA_SSO_ID,LAST_EXTRACTED_DATE)
VALUES(?,?,to_date(?))', SUBSTRING(InputRoot.BLOB.BLOB FROM 1 FOR ,SUBSTRING(InputRoot.BLOB.BLOB FROM 9 FOR 10),'20060620' );

Somehow the apostophe was not getting through.
But now it is working fine.

Regards
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
fjb_saper
PostPosted: Thu Jun 22, 2006 5:40 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

I thought you had to be at least at Oracle 9 with broker 6?
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
biswagourab
PostPosted: Thu Jun 22, 2006 8:01 pm    Post subject: Reply with quote

Apprentice

Joined: 31 May 2005
Posts: 47
Location: London

Hi fjb_saper
I have an Oracle 9.2 client on my system. I am accessing a remote Oracle DB 8.1 on Linux server using ODBC.

Hope this info helps you.

Thanks
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Inserting [b]DATE[/b] field into Oracle 8.1 using WBIMB
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.