how would i get the opposite of this query...all records in temp_b_sd_02 that are not in the join
if i switch the = to <> in the join it doesnt run or runs extrememly slow
or create a flag field in temp_b_sd_02 and update would work if i could update it from the results of this query
not sure what the best method is or how to do it
----------------------------------------------------------
SELECT DISTINCT
temp_b_sd_02.sd_line_id, temp_b_sd_02.sd_item_info,
temp_b_sd_02.sd_rate_type, temp_a_sd_02.resale_desc,
temp_b_sd_02.type, temp_a_sd_02.resale_code,
temp_a_sd_02.resale_state, temp_b_sd_02.sd_bill_amt
FROM dbo.temp_a_sd_02 INNER JOIN
dbo.temp_b_sd_02 ON
dbo.temp_a_sd_02.type = dbo.temp_b_sd_02.type AND
dbo.temp_a_sd_02.sd_line_id = dbo.temp_b_sd_02.sd_line_id
if i switch the = to <> in the join it doesnt run or runs extrememly slow
or create a flag field in temp_b_sd_02 and update would work if i could update it from the results of this query
not sure what the best method is or how to do it
----------------------------------------------------------
SELECT DISTINCT
temp_b_sd_02.sd_line_id, temp_b_sd_02.sd_item_info,
temp_b_sd_02.sd_rate_type, temp_a_sd_02.resale_desc,
temp_b_sd_02.type, temp_a_sd_02.resale_code,
temp_a_sd_02.resale_state, temp_b_sd_02.sd_bill_amt
FROM dbo.temp_a_sd_02 INNER JOIN
dbo.temp_b_sd_02 ON
dbo.temp_a_sd_02.type = dbo.temp_b_sd_02.type AND
dbo.temp_a_sd_02.sd_line_id = dbo.temp_b_sd_02.sd_line_id