task #7435
Updated by Andreas Müller almost 6 years ago
Some names do have a second nomenclatural reference (or at least a second reference). This is usually handled as name fact (NameFactCategoryFk = 1). But sometimes this information is also to be found in some of the notes fields (detail Notes, taxonNotes, nameNotes, ...). This information needs to be checked, and in case it is correct moved to the name fact to be imported correctly if not already duplicated there. Also the import needs to be adapted to import name facts of cat=1 as original source of type "2nd nom ref" or "also published in". Discuss with ERS what the exact semantic is in E+M for this category. Also published in name facts: ~~~ sql SELECT n.NameCache, n.FullNameCache, pt.PTRefFk, fact.NameFactId, fact.PTNameFk, fact.NameFact, fact.NameFactCategoryFk, fact.NameFactRefFk, fact.DoubtfulFlag, fact.PublishFlag, NameFact.NameFactId, NameFact.PTNameFk, NameFact.NameFact, NameFact.NameFactCategoryFk, NameFact.NameFactRefFk, NameFact.DoubtfulFlag, NameFact.PublishFlag, fact.Created_When, fact.Updated_When, fact.Created_Who, fact.Updated_Who, fact.Notes, fact.NameFactRefDetail NameFact.Created_When, NameFact.Updated_When, NameFact.Created_Who, NameFact.Updated_Who, NameFact.Notes, NameFact.NameFactRefDetail FROM NameFact fact INNER JOIN Name AS n ON fact.PTNameFk NameFact.PTNameFk = n.NameId LEFT OUTER JOIN PTaxon pt ON pt.PTNameFk = fact.PTNameFk AND pt.PTRefFK NOT IN (500000) WHERE (fact.NameFactCategoryFk (NameFact.NameFactCategoryFk = 1) ORDER BY pt.PTRefFk, n.FullNameCache ~~~