def tblCites
      @headers = %w{TaxonNameID SeqNum RefID NomenclatorID LastUpdate ModifiedBy NewNameStatus CitePages Note TypeClarification CurrentConcept ConceptChange InfoFlags InfoFlagStatus PolynomialStatus}
      sql = []

      @name_collection.citations.keys.each do |name_id|
        seq_num = 1 
        @name_collection.citations[name_id].each do |ref_id, nomenclator_index, properties|
          cols = {
            TaxonNameID:       name_id,
            SeqNum:            seq_num,
            RefID:             ref_id,
            NomenclatorID:     nomenclator_index,
            LastUpdate:        @time, 
            ModifiedBy:        @authorized_user_id,
            CitePages:         (properties[:cite_pages] ? properties[:cite_pages] : @empty_quotes),
            NewNameStatus:     0,
            Note:              (properties[:note] ? properties[:note] : @empty_quotes),
            TypeClarification: 0,     # We might derive more data from this
            CurrentConcept:    (properties[:current_concept] == true ? 1 : 0),     # Boolean, right?
            ConceptChange:     0,     # Unspecified
            InfoFlags:         0,     # 
            InfoFlagStatus:    1,     # 1 => needs review
            PolynomialStatus:  0
          }
          sql << sql_insert_statement('tblCites', cols) 
          seq_num += 1
        end
      end
      sql.join("\n")
    end
def tblCites
      @headers = %w{TaxonNameID SeqNum RefID NomenclatorID LastUpdate ModifiedBy NewNameStatus CitePages Note TypeClarification CurrentConcept ConceptChange InfoFlags InfoFlagStatus PolynomialStatus}
      sql = []

      @name_collection.citations.keys.each do |name_id|
        seq_num = 1 
        @name_collection.citations[name_id].each do |ref_id, nomenclator_index, properties|
          cols = {
            TaxonNameID:       name_id,
            SeqNum:            seq_num,
            RefID:             ref_id,
            NomenclatorID:     nomenclator_index,
            LastUpdate:        @time, 
            ModifiedBy:        @authorized_user_id,
            CitePages:         (properties[:cite_pages] ? properties[:cite_pages] : @empty_quotes),
            NewNameStatus:     0,
            Note:              (properties[:note] ? properties[:note] : @empty_quotes),
            TypeClarification: 0,     # We might derive more data from this
            CurrentConcept:    (properties[:current_concept] == true ? 1 : 0),     # Boolean, right?
            ConceptChange:     0,     # Unspecified
            InfoFlags:         0,     # 
            InfoFlagStatus:    1,     # 1 => needs review
            PolynomialStatus:  0
          }
          sql << sql_insert_statement('tblCites', cols) 
          seq_num += 1
        end
      end
      sql.join("\n")
    end
Generate tblCites string.