I got the following SQL Code, I need
- Execute an Insert only if the code returns more than 0 rows.
-
Put messages on the screen for the person who executes the script, saying
No missing rows were detected or
3 missing rows were detected and added.select * from DistributionKey_Section where SectionID
not in
(
select siteid from Site where SiteTypeCodeID IN(8)
)
and DistributionKeyID NOT IN
(
select DistributionKeyID from DistributionKey where UnitInclusive=1
)
1 Answer