LEFT OUTER JOINS

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
rcasey
Participant
Posts: 14
Joined: Mon Dec 15, 2003 1:33 pm
Location: Tennessee

LEFT OUTER JOINS

Post by rcasey »

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
rcasey
bless me o creator for I am a Newbie
dsxdev
Participant
Posts: 92
Joined: Mon Sep 20, 2004 8:37 am

Post by dsxdev »

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
Happy DataStaging
rcasey
Participant
Posts: 14
Joined: Mon Dec 15, 2003 1:33 pm
Location: Tennessee

Post by rcasey »

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
rcasey
bless me o creator for I am a Newbie
Post Reply