Microsoft
Software
Hardware
Network
Question : Trim text type field in sql server
Hi,
What function can I use to trim a text type field in sql server? The user is trying to use web merge application and the data is showing up with some nasty carriage returns/line feed.
I tried rtrim but it does not like this type of data field. As well, I tried this on the field after retrieval from database...this is in peoplecode:
&FIND_QUOTE3 = Find(Char(10), &RecLine.DESCRLONG.Value);
If &FIND_QUOTE3 > 0 Then
&NEWSTR3 = Substitute(&RecLine.DESCRL
ONG.Value,
Char(10), "");
&RecLine.DESCRLONG.Value = &NEWSTR3;
End-If;
&FIND_QUOTE4 = Find(Char(13), &RecLine.DESCRLONG.Value);
If &FIND_QUOTE4 > 0 Then
&NEWSTR4 = Substitute(&RecLine.DESCRL
ONG.Value,
Char(13), "");
&RecLine.DESCRLONG.Value = &NEWSTR4;
End-If;
Answer : Trim text type field in sql server
>>the data is showing up with some nasty carriage returns/line feed.<<
If they really are CrLf then it is CHAR(13) + CHAR(10).
Random Solutions
RSA descryption give bad Data exception
Unable to remove printer driver for HP LaserJet 1300 PCL 5e
Change backcolor in Access subform in Datasheet view
Vista Home Basic & Vista Business - IE8 not supported
MS Access Audit using Screen.ActiveControl.OldVa<wbr />lue
Outlook 2007 Browser Link
Reason for MyProj.csproj.FileListAbso<wbr />lute.txt
HTTP Error 403.1 publishing WCF Service
Excel function/formula
Dynamics CRM 4.0 Edit an active contract