use vegas
insert into user_list (login_name,dept,active)
select login_name,dept_code,active from flower.dbo.am_employee where dept_code='SC00' use vegas
select * from user_list use flower
select * from am_employee select count(login_name) from user_list group by login_name select distinct login_name,dept,active into #temp from user_list
select * from #temp truncate table user_list insert into user_list (login_name,dept,active)
select * from #temp drop table #temp
insert into user_list (login_name,dept,active)
select login_name,dept_code,active from flower.dbo.am_employee where dept_code='SC00' use vegas
select * from user_list use flower
select * from am_employee select count(login_name) from user_list group by login_name select distinct login_name,dept,active into #temp from user_list
select * from #temp truncate table user_list insert into user_list (login_name,dept,active)
select * from #temp drop table #temp
相关文章
暂无评论...