def tblTypeSpecies
      @headers = %w{GenusNameID SpeciesNameID Reason AuthorityRefID FirstFamGrpNameID LastUpdate ModifiedBy NewID}
      sql = []

      names = @name_collection.names_at_rank('genus') + @name_collection.names_at_rank('subgenus')
      names.each do |n|
        if n.properties[:type_species_id]
          ref = get_ref(n)

          # ref = @by_author_reference_index[n.author_year_index]
          next if ref.nil?
          cols = {
            GenusNameID: n.id ,
            SpeciesNameID: n.properties[:type_species_id],
            Reason: 0            ,
            AuthorityRefID: 0    ,
            FirstFamGrpNameID: 0 ,
            LastUpdate: @time    ,
            ModifiedBy: @authorized_user_id   ,
            NewID: 0 # What is this?  
          }
          sql << sql_insert_statement('tblTypeSpecies', cols) 
        end
      end
      sql.join("\n")
    end
def tblTypeSpecies
      @headers = %w{GenusNameID SpeciesNameID Reason AuthorityRefID FirstFamGrpNameID LastUpdate ModifiedBy NewID}
      sql = []

      names = @name_collection.names_at_rank('genus') + @name_collection.names_at_rank('subgenus')
      names.each do |n|
        if n.properties[:type_species_id]
          ref = get_ref(n)

          # ref = @by_author_reference_index[n.author_year_index]
          next if ref.nil?
          cols = {
            GenusNameID: n.id ,
            SpeciesNameID: n.properties[:type_species_id],
            Reason: 0            ,
            AuthorityRefID: 0    ,
            FirstFamGrpNameID: 0 ,
            LastUpdate: @time    ,
            ModifiedBy: @authorized_user_id   ,
            NewID: 0 # What is this?  
          }
          sql << sql_insert_statement('tblTypeSpecies', cols) 
        end
      end
      sql.join("\n")
    end
Generate tblTypeSpecies string.