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
Create Table on the fly for BULK Insert
Earliest and latest times each day - mdb query
SBS 2008 / Exchange Server 2007/Outlook 2007 Sync Error 0X80072F06 - Offline Address Book
Can't see hidden files
FltMgr will not load in windows 2000 server
How to use Sharepoint Lookup Field with Name column (hyperlink)
If a field is blank I need it let other calculations after it work in a form. I know that its something to do with a null.
Where can i find a list of differences between IIS 7.0 and IIS 7.5
Determine whether file is saved in Access 2007 "trusted location"
How to sort complecated text in excel