Removing The Euro Symbol From Export Data

Depending on the settings in your environment, you may sometimes need to remove certain symbols (such as the Euro symbol) from the notes on Expense Forms.

This example script will remove the Euro Symbol from all note fields.

It should be used with extreme caution and only by a suitably trained consultant or database administrator familiar with SQL scripts.

A backup of the database should be taken prior to applying the script.

DECLARE @find nvarchar(255),
@replace nvarchar(255),
@patfind nvarchar(255)

SELECT @find = ‘€’,
@replace = ‘EUR ‘

SELECT @patfind = ‘%’ + @find + ‘%’

UPDATE [LINKED_TEXT] SET [Linked_Text] = STUFF(CONVERT (nvarchar, [Linked_Text]),
PATINDEX( @patfind, [Linked_Text] ),
DATALENGTH( @find )-1,
@replace )
WHERE [Linked_Text] LIKE @patfind