Non equi join in datastage

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
baglasumit21
Participant
Posts: 132
Joined: Wed Mar 01, 2006 11:12 pm
Location: Pune

Non equi join in datastage

Post by baglasumit21 »

Can any one tell me some logic to implement the non-equi join using datastage. The example is given below.

Table1
Student Marks
A 50
B 80
C 70
D 35
E 90
...

Table2

Lowerlimit UpperLimit Grade
0 35 D
36 59 C
60 74 B
75 100 A

my desired output is as below



Student Marks Grade
A 50 C
B 80 A
C 70 B
D 35 D
E 90 A
SMB
sachin1
Participant
Posts: 325
Joined: Wed May 30, 2007 7:42 am
Location: india

Re: Non equi join in datastage

Post by sachin1 »

Transform routine will definitlyhelp.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

A 101-row hashed file lookup table mapping mark to grade would perform best. You could use an expression with three nested levels of If..Then..Else. You could create a routine that does the same thing.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply