SQL Statement to Change Contact Name Format in Microsoft Dynamics CRM
Posted Wednesday, August 19th, 2009
Below is a simple SQL Statement to change the format of Contacts’ names in Microsoft CRM. We didn’t reinvent the wheel with this, and we’re sure this is posted somewhere, but we have it and thought we would share.
Run this SQL statement against the MSCRM Organization DB.
(As always, before you make a modification to the DB, it is recommended that you make a backup of the DB or the tables that are being modified.)
“Last Name, First Name” format for Contacts:
UPDATE contactbase SET fullname = ISNULL(lastname, ”) + ‘, ‘ +
ISNULL(firstname, ”)
“First Name Last Name” format for Contacts:
UPDATE contactbase SET fullname = ISNULL(firstname, ”) + ‘ ‘ +
ISNULL(lastname, ”)
*This solution involves making changes to 1 or more databases. It is not suggested that changes made to a database without first making a backup of the database. If possible, alternatives such as a MS Hotfix or MS rollup should be used to try to solve the issue, before modifying a database. If you do decide to modify the database, it is suggested that the modifications are made by an IT Director, Technical Specialist or MIS department. Serious problems might occur if you modify the database incorrectly. Be sure to backup the database before making changes. Any problems might require that you rollback your databases and even result in the loss of data records. I.B.I.S., Inc. cannot guarantee that these problems can be solved. Modify the database at your own risk.


