
CREATE PROCEDURE [dbo].[s_spice_exportViews] AS

print 'Updating table SPICE_Occurence'
delete from SPICE_Occurence
insert into SPICE_Occurence select * from SPICE_Occurence_VIEW

print 'Updating table SPICE_Reference'
delete from SPICE_Reference
insert into SPICE_Reference select * from SPICE_Reference_VIEW

print 'Updating table SPICE_Taxon'
delete from SPICE_Taxon
insert into SPICE_Taxon select * from SPICE_Taxon_VIEW

print 'Updating table SPICE_TaxonId2AccId'
delete from SPICE_TaxonId2AccId
insert into SPICE_TaxonId2AccId select * from SPICE_TaxonId2AccId_VIEW

print 'Updating table SPICE_TaxonID2HigherTaxonID'
delete from SPICE_TaxonID2HigherTaxonID
insert into SPICE_TaxonID2HigherTaxonID select * from SPICE_TaxonID2HigherTaxonID_VIEW

print 'Updating table SPICE_TaxonSearch'
delete from SPICE_TaxonSearch
insert into SPICE_TaxonSearch select * from SPICE_TaxonSearch_VIEW




GO
