How do I get a list of inactive contacts with no activities in OTBI so I can delete them?
You can create the list of contacts in an inactive status with no associated activities using the following SQL query in Oracle Transactional Business Intelligence (OTBI). You can then use the party IDs in the list to delete the inactive contacts using Import Management. Import Management doesn't permanently purge the data. To purge the contacts, you must use the Manage Party Purge Activities task in the Setup and Maintenance work area.
Here's the sample SQL query to get a list of contacts in the Inactive status that don't have any activities associated with them:
SELECT
0 s_0,
"Sales - CRM Contacts"."Contact"."Contact Row ID" s_1,
"Sales - CRM Contacts"."Contact"."First Name" s_2,
"Sales - CRM Contacts"."Contact"."Full Name" s_3,
"Sales - CRM Contacts"."Contact"."Last Name" s_4,
"Sales - CRM Contacts"."Contact"."Sales Profile Status" s_5,
"Sales - CRM Contacts"."Contact Fact"."# of Contacts" s_6,
"Sales - CRM Sales Activity"."Activity Facts"."# of Activities" s_7
FROM "Sales - CRM Contacts"
WHERE
(("Sales - CRM Sales Activity"."Activity Facts"."# of Activities" = 0) AND ("Contact"."Sales Profile Status" = 'INACTIVE'))
ORDER BY 5 ASC NULLS LAST, 6 ASC NULLS LAST, 2 ASC NULLS LAST, 3 ASC NULLS LAST, 4 ASC NULLS LAST
FETCH FIRST 75001 ROWS ONLY