def tblNomenclator
      @headers = %w{NomenclatorID GenusNameID SubgenusNameID SpeciesNameID SubspeciesNameID LastUpdate ModifiedBy SuitableForGenus SuitableForSpecies InfrasubspeciesNameID InfrasubKind}
      sql = []   
      i = 1

      # Ugh, move build from here 
      @name_collection.nomenclators.keys.each do |i|
        name =  @name_collection.nomenclators[i]
        genus_id = @genus_names[name[0]]
        genus_id ||= 0
        subgenus_id = @genus_names[name[1]]
        subgenus_id ||= 0
        species_id = @species_names[name[2]]
        species_id ||= 0
        subspecies_id = @species_names[name[3]]
        subspecies_id ||= 0
        variety_id = @species_names[name[4]]
        variety_id ||= 0

        cols = {
          NomenclatorID: i,
          GenusNameID: genus_id, 
          SubgenusNameID: subgenus_id, 
          SpeciesNameID: species_id, 
          SubspeciesNameID: subspecies_id,
          InfrasubspeciesNameID: variety_id,
          InfrasubKind: (variety_id == 0 ? 0 : 2), 
          LastUpdate: @time,  
          ModifiedBy: @authorized_user_id, 
          SuitableForGenus: 0,                      # Set in SF w test
          SuitableForSpecies: 0                     # Set in SF w test
        }
        i += 1
        sql << sql_insert_statement('tblNomenclator', cols) 
      end

      sql.join("\n")
    end
def tblNomenclator
      @headers = %w{NomenclatorID GenusNameID SubgenusNameID SpeciesNameID SubspeciesNameID LastUpdate ModifiedBy SuitableForGenus SuitableForSpecies InfrasubspeciesNameID InfrasubKind}
      sql = []   
      i = 1

      # Ugh, move build from here 
      @name_collection.nomenclators.keys.each do |i|
        name =  @name_collection.nomenclators[i]
        genus_id = @genus_names[name[0]]
        genus_id ||= 0
        subgenus_id = @genus_names[name[1]]
        subgenus_id ||= 0
        species_id = @species_names[name[2]]
        species_id ||= 0
        subspecies_id = @species_names[name[3]]
        subspecies_id ||= 0
        variety_id = @species_names[name[4]]
        variety_id ||= 0

        cols = {
          NomenclatorID: i,
          GenusNameID: genus_id, 
          SubgenusNameID: subgenus_id, 
          SpeciesNameID: species_id, 
          SubspeciesNameID: subspecies_id,
          InfrasubspeciesNameID: variety_id,
          InfrasubKind: (variety_id == 0 ? 0 : 2), 
          LastUpdate: @time,  
          ModifiedBy: @authorized_user_id, 
          SuitableForGenus: 0,                      # Set in SF w test
          SuitableForSpecies: 0                     # Set in SF w test
        }
        i += 1
        sql << sql_insert_statement('tblNomenclator', cols) 
      end

      sql.join("\n")
    end
Must be called post tblGenusNames and tblSpeciesNames.
 Some records are not used but can be cleaned by SF