Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am facing a problem,
In my straight table having two fields
teacher | subjects |
ravi | 0 |
anil | 2 |
kumar | 0 |
ravi | 1 |
shiva | 2 |
teja | 2 |
ravi | 2 |
runil | 0 |
ashok | 0 |
In The Table: 1) teacher names are repated
2)subjects belongings to count of teacher
My Requirement : 1) I want remove duplicates in teacher with max(subjects) number required
plz help me ASAP.
Thanks
Hi Ravi,
You cannot join both the tables unless you create a primary key. Try to identify a primary key and then you can impliment the logic suggested by Rob.
Best Regards,
KC
Hi,
I am already using Max(subject) in my straight table expressions then '0' values are unvisible thats the reason i posted in community
Plz give me any valuable suggestions
Hi,
Since there is no common field to join both table, and considering both teachers and subjects table at same row in both table then you can use recno() to give row number and using that field you can join both table.
try below script:
Data:
Load RecNo() as rec_no,teacher Inline [
teacherravi
anil
kumar
ravi
shiva
teja
ravi
runil
ashok
];
join
Load RecNo() as rec_no,* Inline [
subjects
0
2
0
1
2
2
2
0
0
];
NoConcatenate
final:
LOAD
teacher,
max(subjects) as subjects
Resident Data
Group by teacher;
Drop table Data;
Regards,
Prashant
Hi,
I am already created flag for two tables for unique association purpose
what is your flag? can you post your working file.???
Please provide all details to get most appropriate answer, instead of guessing.
Regards,