日期:2014-05-18 浏览次数:20583 次
INSERT INTO #TMP_LAND ( land_id, big_land_id, land_number ) ( SELECT a.land_id, c.land_id, c.land_number FROM (SELECT * FROM imp_land WHERE case_number = @inCase_Number) a, (SELECT * FROM imp_land_mod WHERE case_number = @inCase_Number) b, ch_land c WHERE a.land_number *= b.land_number AND a.land_number = c.land_number AND b.att_gra_mod IS NULL )
EXEC SP_DBCMPTLEVEL 'TABLE_NAME','90'
INSERT INTO #TMP_LAND ( land_id, big_land_id, land_number ) ( SELECT a.land_id, c.land_id, c.land_number FROM (SELECT * FROM imp_land WHERE case_number = @inCase_Number) a left join (SELECT * FROM imp_land_mod WHERE case_number = @inCase_Number) b on a.land_number = b.land_number inner join ch_land c on a.land_number = c.land_number WHERE b.att_gra_mod IS NULL )