Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
student marks table 1 and remarks to be matched from table 2
Student marks in table 1 to be mapped/joined to student remarks in table 2
table1:
Student Marks
A,10
B,20
C,25
D,18
table2:
student remarks
5-11,D grade
12-16,C Grade
17-21,B Grade
22-25,A Grade
I want the table to be mapped or joined using interval match or any other way to get the remarks information
output
student student_marks Remarks
A 10 D Grade
like this i want to have the output, please help
Hi,
Please check the below if it helps. I have attached the qvw file also.
table1:
LOAD * Inline [
Student,Marks
A,10
B,20
C,25
D,18
];
table2:
LOAD
SubField(MarksRange,'-') as MinMarks,
SubField(MarksRange,'-') as MaxMarks,
remarks
;
LOAD * Inline [
MarksRange,remarks
5-11,D grade
12-16,C Grade
17-21,B Grade
22-25,A Grade
];
Join IntervalMatch(Marks)
LOAD MinMarks, MaxMarks Resident table2;
Left Join (table1)
LOAD Marks, remarks Resident table2;
DROP Table table2;
Hi,
Please check the below if it helps. I have attached the qvw file also.
table1:
LOAD * Inline [
Student,Marks
A,10
B,20
C,25
D,18
];
table2:
LOAD
SubField(MarksRange,'-') as MinMarks,
SubField(MarksRange,'-') as MaxMarks,
remarks
;
LOAD * Inline [
MarksRange,remarks
5-11,D grade
12-16,C Grade
17-21,B Grade
22-25,A Grade
];
Join IntervalMatch(Marks)
LOAD MinMarks, MaxMarks Resident table2;
Left Join (table1)
LOAD Marks, remarks Resident table2;
DROP Table table2;