 
 
 select taxon_name_id,count(*) from temp_dnametest having count(*) > 1 group by taxon_name_id;
+
+
+
+
+
+select * from temp_dnametest where nvl(DISPLAY_NAME,'null') != nvl(GDISPLAY_NAME,'null');
+
+
+
+select
+	--'"' || display_name || '"' || chr(9) || '"' || gdisplay_name || '"'
+	display_name || '------>' ||  gdisplay_name
+from
+	temp_dnametest where
+	gdisplay_name not like 'ERROR%' and gdisplay_name is not null and display_name!=gdisplay_name
+	order by display_name;
+
+	select count(*) from temp_dnametest;
+
+
+select display_name || '------>' ||  gdisplay_name from temp_dnametest where
+gdisplay_name not like 'ERROR%' and gdisplay_name is not null and
+nvl(DISPLAY_NAME,'null') != nvl(GDISPLAY_NAME,'null')
+order by display_name;
+
+
+create table temp_gdnerr as select * from temp_dnametest where gdisplay_name like 'ERROR%';
+
+
+
+create table temp_dname_diff as select * from temp_dnametest where
+gdisplay_name not like 'ERROR%' and gdisplay_name is not null and
+nvl(DISPLAY_NAME,'null') != nvl(GDISPLAY_NAME,'null');
+
+alter table temp_dname_diff add arctoslink varchar2(4000);
+update temp_dname_diff set arctoslink='http://arctos.database.museum/name/' || urlescape(scientific_name);
+
+
+
+SET TERMOUT OFF
+SET ECHO OFF
+SET LINES 1000
+SET FEEDBACK off
+SET HEADING OFF
+SET ARRAYSIZE 10000
+SET NEWPAGE NONE
+SET PAGESIZE 0
+SET TRIMSPOOL ON
+spool temp_dname_diff.csv
+select  '"' || SCIENTIFIC_NAME || '","' || replace(DISPLAY_NAME,'"','""') || '","' || replace(GDISPLAY_NAME,'"','""')|| '","' || ARCTOSLINK || '"'
+ from temp_dname_diff where rownum<100;
+Spool OFF;
+EXIT
+
+
+
+spool off;
+
 
 
 create index ix_temp_junk on temp_dnametest (taxon_name_id) tablespace uam_idx_1;

update temp_dnametest set gdisplay_name=null where gdisplay_name not like 'ERROR%' and gdisplay_name!=display_name;

------------------------------------------------------------------------------------------------------------------------
ERROR: The string v_convar. is not a valid ColdFusion variable name.
ERROR: The string v_canonical name is not a valid ColdFusion variable name.
ERROR: The string v_nothof. is not a valid ColdFusion variable name.
ERROR: The string v_subvar. is not a valid ColdFusion variable name.
ERROR: The string v_prol. is not a valid ColdFusion variable name.
ERROR: The string v_scientific name is not a valid ColdFusion variable name.
ERROR: The request has exceeded the allowable time limit Tag: CFLOOP
ERROR: The string v_subhybr. is not a valid ColdFusion variable name.
ERROR: The string v_subsubvar. is not a valid ColdFusion variable name.
ERROR: The string v_nothosubsp. is not a valid ColdFusion variable name.
ERROR: The string v_lus. is not a valid ColdFusion variable name.
ERROR: The string v_modif. is not a valid ColdFusion variable name.
ERROR: The string v_nothovar. is not a valid ColdFusion variable name.
ERROR: The string v_monstr. is not a valid ColdFusion variable name.
ERROR: The request has exceeded the allowable time limit Tag: CFQUERY
ERROR: The string v_name string is not a valid ColdFusion variable name.
ERROR: The string v_nm. is not a valid ColdFusion variable name.
ERROR: The string v_agamovar. is not a valid ColdFusion variable name.

ERROR: The string v_agamosp. is not a valid ColdFusion variable name.
ERROR: The string v_canonical string is not a valid ColdFusion variable name.
ERROR: The string v_subf. is not a valid ColdFusion variable name.



select scientific_name from temp_dnametest where gdisplay_name = 'ERROR: The string v_canonical name is not a valid ColdFusion variable name.';

update temp_dnametest set gdisplay_name=null where gdisplay_name ='ERROR: The request has exceeded the allowable time limit Tag: CFLOOP';
update temp_dnametest set gdisplay_name=null where gdisplay_name ='ERROR: The request has exceeded the allowable time limit Tag: CFQUERY';
