Convert Users into Contacts

Convert Users into Contacts



  1. --Create contacts out of our users
  2. INSERT INTO __M_Contacts (Id, Final_Kind, Final_FirstName, Final_MiddleName, Final_LastName)
  3. SELECT CONCAT('__M_Users --- ', Id), 'Person', Final_FirstName, Final_MiddleName, Final_LastName FROM __M_Users

    • Related Articles

    • SQL Spreadsheets: Cherry Picking Contacts

      The following SQL command will generate a spreadsheet that can be used to cherry-pick specific contacts. CREATE OR ALTER FUNCTION SafeSingleLine ( @Input NVARCHAR(MAX) ) RETURNS NVARCHAR(MAX) AS BEGIN DECLARE @Ret NVARCHAR(MAX) = COALESCE(@Input, '') ...
    • 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 User-Select/Contact-Select Custom Fields => Participants

      Some systems do not support User-Select or Contact Select custom fields. The following query will transform User-Select fields into Matter Participants. This script can easily be adapted for Contact-Select fields. -- Transform Custom Fields on ...
    • Convert Any Field into a Picklist

      The following script lets you convert any field into a picklist. --This script will convert any field (usually text fields) into Picklists --and generate Picklist Options from the values. GO DECLARE @Ids Table(Id NVARCHAR(MAX)) INSERT INTO @Ids ...
    • 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 ...