473,387 Members | 1,440 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

How do I remove CHAR(10) and Char(13) from a table column

I import information from a third party and they have the ability in the description field to do carriage returns and line feeds. How can I remove the carriage returns and line feeds from the select before updating our table
Sep 23 '10 #1
1 19834
amitpatel66
2,367 Expert 2GB
Can you please post the query that you are trying?
You can very well remove the carriage returns and line feed by a simple replace statement.

Something like:

Expand|Select|Wrap|Line Numbers
  1. SQL> ed
  2. Wrote file afiedt.buf
  3.  
  4.   1  with t as (SELECT 'This is line 1'||CHR(10)||'This is line2' col1 from dual)
  5.   2* SELECT col1 from t
  6. SQL> /
  7.  
  8. COL1
  9. ----------------------------
  10. This is line 1
  11. This is line2
  12.  
  13.  
  14. SQL> ed
  15. Wrote file afiedt.buf
  16.  
  17.   1  with t as (SELECT 'This is line 1'||CHR(10)||'This is line2' col1 from dual)
  18.   2* SELECT col1,REPLACE(col1,CHR(10),' ') clean_data from t
  19. SQL> /
  20.  
  21. COL1                         CLEAN_DATA
  22. ---------------------------- ----------------------------
  23. This is line 1               This is line 1 This is line2
  24. This is line2
  25.  
  26.  
  27. SQL> 
  28.  
  29.  
Sep 24 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: oembuilders | last post by:
Hi all, Would anyone know a way to convert a char(10) in format 'm/d/yyyy' to 'mm/dd/yyyy', so I can convert the column to datetime format. Thanks
12
by: Lars Langer | last post by:
Hi there, I'm new to this C - never the less - I'm trying to search a string for the occurence of a substring - However, I'm not very succesful since my use of the strstr function always returns...
7
by: No Spam | last post by:
Dear Access 2003 users, Can anyone assist me with creating either code (preferred) or a query that would remove a single field (called ID) from a table? And as a bonus question, can anyone...
24
by: kevin.hall | last post by:
Is char** (or char*) implicitly convertible to 'const char * const *'? I couldn't find anything about it in the standard. MSVS 8.0 allows this. I'm curious if I'll run into trouble with other...
13
by: Betaver | last post by:
What char represent "a new line"?13 or 10, or both? I got a lot of problem when read a char. Eg. ======== 1 2 a b ======== If I write: int n1,n2; char c1,c2;
12
by: GRoll35 | last post by:
I get 4 of those errors. in the same spot. I'll show my parent class, child class, and my driver. All that is suppose to happen is the user enters data and it uses parent/child class to display...
20
by: gert | last post by:
This based on a example i found at http://www.cs.tut.fi/~jkorpela/ forms/cgic.html #include <fcgi_stdio.h> #include <stdlib.h> int urldecode(char *src, char *last, char *dest){ int code;...
2
by: wingleader | last post by:
Hi. Got such a problem. I wrote a url decoding programm. The main idea is, that programm take char by char from incoming string, decides what changes must be made, and then inserts them to...
16
by: Virtual_X | last post by:
if we use char in a function parameter like that void st(char x) {cout << x;} and char* as a parameter in the same function instead of char x what would be different in my experiments i...
2
by: iritchie | last post by:
*(Apologies, I posted this in the SQL Server forum first) Hello all, I am trying to write a query which breaks down a single address field into individual fields, with char(10) or a...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.