Matters: Prepending Client Names to Matters
The following script will prepend Client Names to Matter Names.  For Example:
- Divorce 2016
 
would become
- John Smith --- Divorce 2016
 
 
Here is the relevant script:
- --Prepend all matter descriptions with the client name.
 - UPDATE
 -     __M_Matters
 - SET
 -     Final_Description = CONCAT(V2.Final_FullName, ' --- ', V1.Final_Description)
 - FROM
 -     __M_Matters V1,
 -     __M_Contacts V2
 - WHERE 1=1
 -     AND V1.Final_ClientContact_Id = V2.Id
 
Related Articles
 
Matters: Trimming Client Numbers from Matter Numbers
The following script will peel off client numbers from matter numbers. For example, if a matter has a ReferenceCode like: ABC-0001 After the script runs, it will have a reference code of: 0001 Scenario 1: There are Client Reference Codes In some ...
 
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 ...
 
Create a "Legacy Client Number" Custom Field
Some firms rely heavily on Client Numbers to search for a specific client. Sometimes when they migrate to a new system it can't replicate the automatic numbering system from their old system so they want to renumber all their matters to a new scheme ...
 
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 ...
 
SQL Spreadsheets: Manually Prioritizing Matters
--The following SQL will generate a list of matters and allow their priorities to easily be specified. CREATE OR ALTER FUNCTION SafeSingleLine ( @Input NVARCHAR(MAX) ) RETURNS NVARCHAR(MAX) AS BEGIN DECLARE @Ret NVARCHAR(MAX) = COALESCE(@Input, '') ...