cancel
Showing results for 
Search instead for 
Did you mean: 

Table Range Join

Former Member
0 Kudos

Hi all, I have created 2 tables (tblBranch and tblReport).

tblBranch

Branch_CodeCodeGWP
BATB001250
BATB003100
BAKB004190
CBC003230
CBC050120
CBC50090

tblReport

Branch_CodeBranchCode_MinCode_Max
BATBAnullnull
BAKBAnullnull
CBCBA1C000C299
CBCBA2C300C999

So, I do the theta join between Code to Code_Min and Code_Max in the universe. What I'm trying to achieve get the GWP (tblBranch) for each Branch (tblReport).

BAT and BAK (Branch Code) are suppose to combine into BA (Branch).

CB (Branch Code) will be link to CBA1 if the Code (tblBranch) in between C000 (tblReport.Code_Min)  and C299 (tblReport.Code_Max)

CB (Branch Code) will be link to CBA2 if the Code (tblBranch) in between C300 (tblReport.Code_Min)  and C999 (tblReport.Code_Max)

However when I try to validate the universe using web intelligence (filter report based on the Branch):

for BA Branch, the GWP is 540 (correct)

for CBA1 Branch, the GWP is 440 (wrong)

for CBA2 Branch, the GWP is 440 (wrong)

Anyone can help me to define where is the mistake or problem coming from.

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member207878
Active Participant
0 Kudos

Have you set cardinality N:1?? If it is, then try LTRIM function to remove first letter of code and after that compare. It will give you correct result.

Can you please attach screenshot of "Edit Join" dialog box?