DSXchange: DataStage and IBM Websphere Data Integration Forum
View next topic
View previous topic
Add To Favorites
Author Message
abhilashnair
Participant



Joined: 13 Oct 2006
Posts: 284

Points: 2791

Post Posted: Thu Feb 13, 2020 7:24 am Reply with quote    Back to top    

DataStage® Release: 11x
Job Type: Parallel
OS: Unix
I have a strange issue wherein a query runs fine in TOAD, but not on Datastage Oracle connector, the job fails with error

The OCI function OCIStmtFetch2 returned status -1. Error code: 1843, Error message: ORA-01843: not a valid month. (CC_OraStatement::fetch, file CC_OraStatement.cpp, line 1,729)

The query is

select
col1,col2..coln
from table 1
where
col1<=(select max(col1) from table 2)

here col1 of table1 and col1 of table2 have same data type- DATE in Oracle
chulett

Premium Poster


since January 2006

Group memberships:
Premium Members, Inner Circle, Server to Parallel Transition Group

Joined: 12 Nov 2002
Posts: 43085
Location: Denver, CO
Points: 222463

Post Posted: Thu Feb 13, 2020 8:55 am Reply with quote    Back to top    

Not strange. Toad just runs the sql and shows you the result, DataStage has to do more than that. It needs to put the results into variables (much like a "select into" in PL/SQL) and that is what is causing your issue. The question is, what are the data types of the columns in the job? An implicit conversion going on under the covers is failing.

_________________
-craig

"You can never have too many knives" -- Logan Nine Fingers
Rate this response:  
Not yet rated
abhilashnair
Participant



Joined: 13 Oct 2006
Posts: 284

Points: 2791

Post Posted: Thu Feb 13, 2020 9:16 am Reply with quote    Back to top    

Weirdly though, the same job works without GREATER THAN EQUAL TO operator within the where condition.

For example when I run the query with below where condition job goes fine

where
col1=(select max(col1) from table 2)
Rate this response:  
Not yet rated
chulett

Premium Poster


since January 2006

Group memberships:
Premium Members, Inner Circle, Server to Parallel Transition Group

Joined: 12 Nov 2002
Posts: 43085
Location: Denver, CO
Points: 222463

Post Posted: Thu Feb 13, 2020 4:47 pm Reply with quote    Back to top    

Probably just a difference in the data selected between the two filters. Still would like to see my question answered.

_________________
-craig

"You can never have too many knives" -- Logan Nine Fingers
Rate this response:  
Not yet rated
abhilashnair
Participant



Joined: 13 Oct 2006
Posts: 284

Points: 2791

Post Posted: Thu Feb 13, 2020 5:10 pm Reply with quote    Back to top    

As I said, I did run the same job without the where condition and with same metadata. It ran successfully
Rate this response:  
Not yet rated
chulett

Premium Poster


since January 2006

Group memberships:
Premium Members, Inner Circle, Server to Parallel Transition Group

Joined: 12 Nov 2002
Posts: 43085
Location: Denver, CO
Points: 222463

Post Posted: Fri Feb 14, 2020 2:31 pm Reply with quote    Back to top    

Right. Oddly enough, I actually read your post before I replied. And unfortunately, simply regurgitating information doesn't help us help you. Sad

We would need more information from you in order to carry on this discussion...

_________________
-craig

"You can never have too many knives" -- Logan Nine Fingers
Rate this response:  
Not yet rated
abhilashnair
Participant



Joined: 13 Oct 2006
Posts: 284

Points: 2791

Post Posted: Thu Feb 20, 2020 9:43 am Reply with quote    Back to top    

chulett wrote:
Not strange. Toad just runs the sql and shows you the result, DataStage has to do more than that. It needs to put the results into variables (much like a "select into" in PL/SQL) and that is what is causing your issue. The question is, what are the data types of the columns in the job? An implicit conversion going on under the covers is failing.

The metadata was imported and loaded in the Oracle connector stage using IMAM, if that is what you were asking. On top of it, I have cros verified them with database.
Rate this response:  
Not yet rated
Display posts from previous:       

Add To Favorites
View next topic
View previous topic
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



Powered by phpBB © 2001, 2002 phpBB Group
Theme & Graphics by Daz :: Portal by Smartor
All times are GMT - 6 Hours