Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all
I have this table
person_id | person_name | person_ref_id
1 ----------- name1 ---------- 50
2 ----------- name2 ---------- 51
3 ----------- name3 ---------- 52
... ...
50 --------- adress1 --------- 200
51 --------- adress2 --------- 201
52 --------- adress3 --------- 202
... ...
200 ------- country1 -------- 500
201 ------- country2 -------- 501
202 ------- country3 -------- 502
... ...
in which person_ref_id is a pointer to person_id.
For example, if I want to find all the information about person_id = 1, I can search for 50 and then 200 and then 500 as if it was a cycle. I'll obtain then the information name1, adress1 and country1 that refers to the same person.
My question is: how can I get all these information and store in a table like this
person_id | person_name | person_adress | person_country
1 ----------- name1 ------- adress1 -------- country1
2 ----------- name2 ------- adress2 -------- country2
...
How can I do that ? Is it possible to do that by reading the original table only once?
Thank you all
@Diego Martino , you need to read the file three times with filter condition of person id to extract name, address and country records separately and then do the join on person_ref_id=person_id from address and county records in tMap and then pass the all records into table.
Thanks,
Manohar
Hi, thank you for your answer.
Isn't it possible to do that by reading the original file only once?
@Diego Martino , you can read three times if it is not huge file.
Thanks,
Manohar
This is the problem, it's a huge file