 select count(*) from hierarchical_taxonomy;
 select count(*) from temp_hierarcicized;
 
-	
+-- yea that's slow - will run in ~day or so tho - try more realistic import
+
+delete from temp_ht;
+
+delete from temp_hierarcicized;
+delete from hierarchical_taxonomy;
+
+insert into temp_ht (scientific_name,taxon_name_id,dataset_name,source) (
+	select distinct
+		scientific_name,
+		taxon_name.taxon_name_id,
+		'med_test',
+		'Arctos'
+	from
+		taxon_name,
+		taxon_term
+	where
+		taxon_name.taxon_name_id=taxon_term.taxon_name_id and
+		taxon_term.source='Arctos' and
+		term_type='class' and
+		term='Aves'
+	);
+
 -- now let the stored procedure chew on things
 
 

</cfif>

<cfif action is "impData">
 impData

-- temp_ht is a list of terms we need to get data and make it hierarchical for

<cfinclude template="/includes/_header.cfm">

<cfif action is "nothing">

	ABOUT:
	<ul>
		<li>
			This is a classification editor; it will NOT create, delete, or alter taxon_name.
		</li>
		<li>
			This form creates hierarchical data from Arctos. Not all data in Arctos can be transformed, and some will be transformed
				unpredictably. For example, given
				<li>genus-->family-->order</li>
				 and
				 <li>othergenus-->family-->otherorder</li>
				 that is, inconsistent hierarchies - here one family split between two orders - then all family will end up
				 as a child of either order or otherorder, whichever is encountered first.
		</li>
	</ul>

	<cfquery name="mg" datasource="user_login" username="#session.dbuser#" password="#decrypt(session.epw,session.sessionKey)#">
		select distinct (dataset_name) from hierarchical_taxonomy
	</cfquery>
