Synthesize Missing Practice Areas
The following SQL script will create practice areas where they do not exist in the Matters table.
- --Synthesize missing practice areas from Matters
- INSERT INTO __M_Matters_PracticeAreas(
- Id,
- Final_Subject
- )
- SELECT DISTINCT
- Final_PracticeArea_Id,
- Final_PracticeArea_Id
- FROM
- __M_Matters
- WHERE 1=1
- AND Final_PracticeArea_Id != '' --Ignore Blank Practice Areas
- AND Final_PracticeArea_Id NOT IN (SELECT Id FROM __M_Matters_PracticeAreas)
Related Articles
Delete unused Practice Areas
The following SQL script will delete unused practice areas. --Delete any practice areas that are not used UPDATE __M_Matters_PracticeAreas SET Final_Status = 'Deleted' WHERE 1=1 AND Id NOT IN( SELECT Final_PracticeArea_Id FROM __M_Matters WHERE ...
Synthesize Missing Matters for Documents
Some systems only allow documents to be linked to matters. These scripts will allow you to restore data into these systems. When Matters No Longer Exist The following script with synthesize matters for document related to matters that no longer ...
Synthesize: Missing Document Categories for Documents
The following script will synthesize document categories for invalid Final_DocumentCategory_Id values on documents. -- Some documents are linked to categories that no longer exist. -- Create dummy document categories based on these values. INSERT ...
Synthesize Missing Client Contacts for Matters
This script below will create dummy contacts where the Matter is assigned to a contact that no longer exists. --Some of the Matters are linked to contacts that no longer exist. --This will create dummy contacts from the missing links. INSERT INTO ...
Convert a Custom Field into a Practice Area
--The system we are coming from does not have practice areas --however, the client has created a picklist custom field that mimics this. --We are going to convert this custom field into a practice area. --First, populate the practice areas table with ...