Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: SQLLDR - whitespace (tab & space) problem

Re: SQLLDR - whitespace (tab & space) problem

From: Jared Still <jkstill_at_cybcon.com>
Date: Fri, 27 Apr 2001 20:35:30 -0700
Message-ID: <F001.002F4C62.20010427203519@fatcity.com>

You can no doubt do this with Sql*loader.

Personally, I like to clean up the data first instead. I find it easier to work with that way.

These task are easy on unix, and not too bad on windoze if you get some decent text tools.

The following line for instance will change all tab characters to a space, then compress all consecutive spaces to a single space.

  tr "\011" " " < dirty.txt | tr -s " " >| clean.txt

You can even send the output to a pipe, and read the pipe directly from sqlloader

  mkfifo loader_pipe
  tr "\011" " " < test.txt | tr -s " " > loader_pipe &   sqlloader ... data=loader_pipe ...

Jared

On Friday 27 April 2001 11:40, Helen Zhung wrote:
> Hello:
> I'm new to SQL Loader. Is there a way to code in control file that can
> separate 'a tab' and 'a blank space' ? I use "FIELDS TERMINATED BY
> WHITESPACE", but it will TERMINATE a field when there is a space or a tab.
> However, the data fields were separated only by the "tab", not 'a space'.
> Is it possible to identify the two? Thanks
>
>
>
>
> ---------------------------------
> Do You Yahoo!?
> Yahoo! Auctions - buy the things you want at great prices


Content-Type: text/html; charset="us-ascii"; name="Attachment: 1"
Content-Transfer-Encoding: 7bit
Content-Description: 
----------------------------------------
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Jared Still
  INET: jkstill_at_cybcon.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Fri Apr 27 2001 - 22:35:30 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US