SQL code to remove contact point purposes from inactive addresses

Hello,

I'm trying to use SQL to remove contact point purposes from addresses that are marked inactive. I've come up with a query that pulls these addresses, but I am having trouble figure out the DELETE command. Any ideas?

Here's my code so far:
SELECT * FROM [impresario].[dbo].[VS_ADDRESS] as a
JOIN [impresario].[dbo].[TX_CONTACT_POINT_PURPOSE] as c
ON a.address_no = c.contact_point_id
WHERE inactive = 'Y'

Thanks!
Anne

Parents Reply Children