I am interested in modifying the attached SQL SERVER query (attached). the current query will read from the MAX_WITH _CC table (a customer table) and write the top n "01" records to CC01 (customer by jurisdiction--CC is a jurisdiction code). This worls fine, but I would like to add one additional feature: as each "01" row is written out, I would like to delete the original row from the MAX_WITH_CC table.
Can you explain how to do that?
INSERT INTO CC01
SELECT DISTINCT top 2100
WHERE MAX_WITH_CC2.CC = '01'
ORDER BY MAX_WITH_CC.ZIP;