Greetings. I need to do a left outer join in DB2 API and use a between date range, example;;
key1 = key2 and date1 between date 2 and date3. I keyed the join into the api stage and it worked in the viewer but the osh abends when I attempt to run it. I then attempted the join stage but do not seem to be able to put in the logic for the between condition. Any ideas?
THX
LEFT OUTER JOINS
Moderators: chulett, rschirm, roy
LEFT OUTER JOINS
rcasey
bless me o creator for I am a Newbie
bless me o creator for I am a Newbie
In a DB2 API Stage you can write your query. if the query works fine at DB2 prompt it would work fine in the job also.
Another solution could be using a Filter Stage in conjunction wiht join Stage. Do a left outer join and send the output of join to a filter Stage wher the condition would be set as date1>date2 and date1<date 3
Another solution could be using a Filter Stage in conjunction wiht join Stage. Do a left outer join and send the output of join to a filter Stage wher the condition would be set as date1>date2 and date1<date 3
Happy DataStaging
I meant to update this. My issue turned out to be that the OSH could not parse the output schema record because of a coding error on my part. Once I corrected the coding error I re-compiled and it ran with no problem. The coding error was, believe it or not, I actually went into the column names in the stage and coded "t1.dataname", "t2.dataname" etc. OSH could not parse due to the "." in the schema...
Thx
Thx
rcasey
bless me o creator for I am a Newbie
bless me o creator for I am a Newbie