paoconnell
Programmer
I'm an experienced programmer, but am new to Oracle.
I have an Oracle table that I am querying, that contains a VARCHAR2 field (DESCRIPTION) whose text contains newlines (the kind is uncertain, but the client runs on Win2K and the server is Solaris). I need the query to use a function to remove (or convert to a space) the newlines, as they interfere with exporting this field to a comma separated text field.
Part of the query as it stands:
DESCRIPTION gets truncated at the first newline.
The guy who exported this field before me resorted to an external C programming to do the filtering; he's not in town right now. I have an idea that PL/SQL may have functions that will help do the trick, but can't find a book in the office that gives me the info I need. Is there a good site out there which is a good reference to the PL/SQL language and functions? Alternatively, does anyone have a code snippet that can be run under SQL Plus and does the same kind of filtering? Thanks!
Pat O'Connell
Visualize Whirled Peas
I have an Oracle table that I am querying, that contains a VARCHAR2 field (DESCRIPTION) whose text contains newlines (the kind is uncertain, but the client runs on Win2K and the server is Solaris). I need the query to use a function to remove (or convert to a space) the newlines, as they interfere with exporting this field to a comma separated text field.
Part of the query as it stands:
Code:
SPOOL C:\TEMP\WPOPERATION.CSV
Select WONUM ||',' ||
TO_CHAR(COMPLETIONDATE) ||','||
'"'|| DESCRIPTION || '"'
FROM wpoperation;
SPOOL OFF
DESCRIPTION gets truncated at the first newline.
The guy who exported this field before me resorted to an external C programming to do the filtering; he's not in town right now. I have an idea that PL/SQL may have functions that will help do the trick, but can't find a book in the office that gives me the info I need. Is there a good site out there which is a good reference to the PL/SQL language and functions? Alternatively, does anyone have a code snippet that can be run under SQL Plus and does the same kind of filtering? Thanks!
Pat O'Connell
Visualize Whirled Peas