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
- Final_Status != 'Deleted'
- )
Related Articles
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, ...
SQL Spreadsheets: Reassigning Practice Areas
Sometimes users want to reassign practice areas as part of the data restore into a new system. The following process makes it easy. Generate the SQL Spreadsheet Run the following command then copy the results and the headers into a Google Doc. ...
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 ...
Audit Scripts: General Audit
After completing a backup there are a number of things that are good to review prior to restoring into the destination system. The script below reviews several of the data points that should be looked at prior to restoring. This script is not ...
Moving Documents into Matters that are Nested under Other Entries
Some systems allow documents to be nested under virtually any other kind of record. This can be challenging when moving documents into systems that have a limited number of parent types. --The following script creates a "MISC DOCUMENTS" matter --And ...