G
Guest
Appending challenge, I have a huge data over 750000 records that I need to
mange one of the challenges I am facing is as follow:
Table1 is a list of SurvyID, SiteNo, SpeciesNo and SpPresence where SurvyID,
SiteNo and SpecieNo are the unique combination.
SurvyID SiteNo SpecieNo SpPresence
Sur1 Sit1 sp1 1
Sur1 Sit1 sp4 1
Sur1 Sit2 sp1 1
Sur1 Sit2 sp2 1
Sur1 Sit2 sp3 1
Table2 is a list of Species where SpecieNo is the unique No
SpecieNo SpecieName SpecieFamily
Sp1 sn1 F1
Sp2 sn2 F1
Sp3 sn3 F1
Sp4 sn4 F1
I need to find out the species that missing from each combinations in table1
(sp2 and sp3 are missing from Sur1 and Sit1, and sp4 is missing from Sur1 and
Sit2).
I need to add the missing combination to table1 and mark each record in the
SpPresence column with 0. The result after append( sorting is not important)
SurvyID SiteNo SpecieNo SpPresence
Sur1 Sit1 sp1 1
Sur1 Sit1 sp4 1
Sur1 Sit2 sp1 1
Sur1 Sit2 sp2 1
Sur1 Sit2 sp3 1
Sur1 Sit1 sp2 0
Sur1 Sit1 sp3 0
Sur1 Sit2 sp4 0
mange one of the challenges I am facing is as follow:
Table1 is a list of SurvyID, SiteNo, SpeciesNo and SpPresence where SurvyID,
SiteNo and SpecieNo are the unique combination.
SurvyID SiteNo SpecieNo SpPresence
Sur1 Sit1 sp1 1
Sur1 Sit1 sp4 1
Sur1 Sit2 sp1 1
Sur1 Sit2 sp2 1
Sur1 Sit2 sp3 1
Table2 is a list of Species where SpecieNo is the unique No
SpecieNo SpecieName SpecieFamily
Sp1 sn1 F1
Sp2 sn2 F1
Sp3 sn3 F1
Sp4 sn4 F1
I need to find out the species that missing from each combinations in table1
(sp2 and sp3 are missing from Sur1 and Sit1, and sp4 is missing from Sur1 and
Sit2).
I need to add the missing combination to table1 and mark each record in the
SpPresence column with 0. The result after append( sorting is not important)
SurvyID SiteNo SpecieNo SpPresence
Sur1 Sit1 sp1 1
Sur1 Sit1 sp4 1
Sur1 Sit2 sp1 1
Sur1 Sit2 sp2 1
Sur1 Sit2 sp3 1
Sur1 Sit1 sp2 0
Sur1 Sit1 sp3 0
Sur1 Sit2 sp4 0