June 16, 2003 at 2:26 pm
I am newbie to this and I am trying to send a file to a vendor while parsing out carriage returns in a memo datatype field.
Anyone know how to remove those carriage returns??
June 16, 2003 at 2:34 pm
Hi,
You could use the REPLACE function to replace the carriage returns with a blank space...
SELECT REPLACE(REPLACE(FieldName,Char(13),''),Char(10),'') from TableName
The Char(10) and Char(13) should take care of the new line and carriage return values in the field...
If the field in question is of "text" type then you will have to use the UPDATETEXT function...
June 16, 2003 at 2:48 pm
Does the UPDATEXT function actually overwrite whats in the column? What would be the syntax on that? Sorry if these are ignorant questions.
June 16, 2003 at 2:58 pm
Does the UPDATEXT function actually overwrite whats in the column? What would be the syntax on that? Sorry if these are ignorant questions.
June 16, 2003 at 10:29 pm
Hello. From BOL (Books Online which can be found under Programs - Microsoft SQL Server)...
Updates an existing text, ntext, or image field. Use UPDATETEXT to change only a portion of a text, ntext, or image column in place. Use WRITETEXT to update and replace an entire text, ntext, or image field.
Syntax
UPDATETEXT { table_name.dest_column_name dest_text_ptr }
{ NULL | insert_offset }
{ NULL | delete_length }
[ WITH LOG ]
[ inserted_data
| { table_name.src_column_name src_text_ptr } ]
There's even more information, just search for UPDATETEXT.
Everett
Everett Wilson
ewilson10@yahoo.com
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply