Does anyone know how to mass add contact point purposes? To do it individually seems like a giant undertaking that I would like to create a short cut to. Any help is appreciated!
We have a job set up to do this, the script is:
insert into TX_CONTACT_POINT_PURPOSE
(purpose_id, contact_point_id, contact_point_category, create_dt, create_loc, created_by, last_update_dt, last_updated_by)
select
21, -- ATTPAC Ack Letter
addr.address_no, -- Contact Point ID
-1, -- Postal Address
GETDATE(),
'SchedJob',
'SchedJub'
from
T_ADDRESS as addr
where
addr.address_type = 69 -- ATTPAC Devo Address
and -- Make sure record does not already exist
not exists (
SELECT
0
FROM TX_CONTACT_POINT_PURPOSE as cpp
WHERE
cpp.contact_point_id = addr.address_no
and
cpp.purpose_id = 21
cpp.contact_point_category = -1
)
Thanks for sharing this! Need to do some more testing, but looks like it's exactly what I needed!
Kanani Reichlin
Seattle Children's Theatre