Posted by Otter at 11:37am Apr 22 '10
You must sign in to send Otter a message
You must sign in to send Otter a message
so far it looks like this (without using any variables):
insert into dbo.[t-IC-HD-all]
select * from dbo.[v-hd2008]
go
insert into dbo.[t-IC-HD-all]
select * from dbo.[v-hd2007] where [Unique identification number for an institution] NOT IN
(Select [Unique identification number for an institution] from dbo.[t-IC-HD-all])
go
insert into dbo.[t-IC-HD-all]
select * from dbo.[v-hd2006] where [Unique identification number for an institution] NOT IN
(Select [Unique identification number for an institution] from dbo.[t-IC-HD-all])
go
----
it works, and that's all I care about. It's easy enough once a year to go in and
truncate table
then revise this code to add one more year and run it again. It's a non-transactional table so it'll never change other than that.
Thank you!
insert into dbo.[t-IC-HD-all]
select * from dbo.[v-hd2008]
go
insert into dbo.[t-IC-HD-all]
select * from dbo.[v-hd2007] where [Unique identification number for an institution] NOT IN
(Select [Unique identification number for an institution] from dbo.[t-IC-HD-all])
go
insert into dbo.[t-IC-HD-all]
select * from dbo.[v-hd2006] where [Unique identification number for an institution] NOT IN
(Select [Unique identification number for an institution] from dbo.[t-IC-HD-all])
go
----
it works, and that's all I care about. It's easy enough once a year to go in and
truncate table
then revise this code to add one more year and run it again. It's a non-transactional table so it'll never change other than that.
Thank you!