﻿
/***********************************************************************************
* FUNCTION f_fixCR
*
* restituisce una stringa in cui ritorni/andate a capo sono sostituiti con "-"
*
***********************************************************************************/
CREATE FUNCTION [dbo].[f_fixCR] (@string VARCHAR(MAX))
RETURNS VARCHAR(MAX) AS  
BEGIN

 RETURN REPLACE(REPLACE(REPLACE(@string, CHAR(13), '-'), CHAR(10), '-'), CHAR(9), '-')

END

