Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Formatting with Carriage Returns -Oracle

Status
Not open for further replies.
Jan 26, 2004
18
US
Hello all and thanks for reading my post.

I have a table in my oracle db that is tracking user comments/notes for each record that is entered. The problem is, the notes are chock full of tabs, carriage returns, white space, commas and other punctuation. When I run a select statement on this column, the formatting is screwed!! Example: SELECT BOM_ID, NOTES FROM BOMS;
1788 9/26/03 Status: Sent to Logistics
10/9/03 Status: LR assigned. 02/02/04 STATUS: RACKS FOR PO025400

1789 9/26/03 Status: Sent to Logistics
10/8/03 Status: LR assigned. 02/02/04 STATUS: RACKS FOR PO025244.

1790 9/26/03 Status: Sent to Logistics
10/6/03 Status: LR assigned. 02/02/04 STATUS: RACKS FOR PO025258


Is there a good way to eliminate carriage returns and white space in my output?? I could do this by hand but I have over 4000 records and my day would suck!! :)

Thanks in advance for any help.
10PoundBrown
 
To eliminate carriage returns I think you can try something like:

UPDATE
BOMS
SET
NOTES = REPLACE(NOTES, CHR(13),CHR(32))
WHERE
NOTES LIKE '%CHR(13)%'


/Goran
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top