CREATE PROCEDURE dbo.p_mov_nsrxx
AS
BEGIN
insert into DJ_NSRXX
select * from ctais..DJ_NSRXX
where NSRSBH not in (select NSRSBH from DJ_NSRXX)
END
AS
BEGIN
insert into DJ_NSRXX
select * from ctais..DJ_NSRXX
where NSRSBH not in (select NSRSBH from DJ_NSRXX)
END
where c.关联字段=b.关联字段 and c.NSRSBH not in (select distinct NSRSBH from DJ_NSRXX)
CREATE PROCEDURE dbo.p_mov_nsrxx
AS
BEGIN
insert into DJ_NSRXX select * from ctais..DJ_NSRXX
where not exist
(select * from DJ_NSRXX A,ctais..DJ_NSRXX B
where A.DJ_NSRXX=B.NSRSBH
)