Re: Large loader file

From: Anurag <avdbi_at_hotmail.com>
Date: Tue, 9 Jul 2002 01:46:07 -0400
Message-ID: <uiku51k7uan07c_at_corp.supernews.com>


[Quoted]  .. or use sed .. if you don't have perl

cat yourfile.dat | sed 's/\^ ^/^^/g' > fixedfile.dat

 .. or if its already in the database you could also try

set heading off linesize 300 pagesize 0 trimspool on set verify off feedback off echo off termout off spool fixup.sql
select 'update '||table_name||' set '||column_name||'=NULL'||

          ' where '||column_name||'='||chr(39)||' '||chr(39)||';' from user_tab_columns
where data_type in ('VARCHAR2', 'CHAR')
and table_name in ('TAB1', 'TAB2' .... list of table names you want to fix .....)
/
spool off

set echo on feedback on termout on linesize 100 pagesize 40 set heading on trimspool off verify on
_at_fixup.sql

... or follow advice of other posters

:)
Anurag

"Bill Thorsteinson" <billthor_at_yahoo.com> wrote in message news:2j4kiu8rsra90cgukmkq4cioggsac4gulj_at_4ax.com...
> On Mon, 8 Jul 2002 15:53:37 -0400, "bgt0990" <btighe_at_neometrics.com>
wrote:
>
> Try perl,
> perl -pi .bak -d 's/^ ^/^/g' yourfile.dat
> This is a standard task for perl.
>
> Or just use NULLIF in your record definition.
>
> --
> Bill
>
> >UltraEdit has a bug with the Carrets
> >
> >it will return ,^^^^, or something similar, we did try it.
> >
> >
> >"TurkBear" <jgreco1_at_mn.rr.com> wrote in message
> >news:5gqjiu0924ue8slbcrri4e0mbnqbs32vgh_at_4ax.com...
> >>
> >> Daniel's solution is the preferred path, but, to get an editor for use
> >with BIG files ( only in a Windows version so far)
> >> try UltraEdit32 -
> >> http://www.ultraedit.com
> >>
> >> It has more features than any other programming editor I have ever used
> >( with the possible exception of SPFPC)...
> >>
> >> It can handle files up to 2Gb for editing ...
> >>
> >>
> >> "bgt0990" <btighe_at_neometrics.com> wrote:
> >>
> >> >I have a 280MB loader file that was produced with Foxpro, in the file
> >every
> >> >instance of what should be a NULL was converted by Foxpro to a space.
So
> >I
> >> >have the sequence ,^space^, when it should be ,^^,
> >> >
> >> >I don't have access to Foxpro to see if this can be fixed there. The
> >file
> >> >is way to big for any editor we have tried to do a search and replace
> >with,
> >> >even if the editor will handle the file size they can't handle a
search
> >and
> >> >replace that big. (even my trusty Vi choked).
> >> >
> >> >
> >> >Is there an easy way to fix this with SQL_loader or a way to do this
in
> >SQL
> >> >against the entire schema of 60 some odd tables??
> >> >
> >> >Any help would be appreciated
> >> >Barry
> >> >
> >> >
> >> >
> >> >
> >> >-----------== Posted via Newsfeed.Com - Uncensored Usenet News
> >==----------
> >> > http://www.newsfeed.com The #1 Newsgroup Service in the
World!
> >> >-----= Over 100,000 Newsgroups - Unlimited Fast Downloads - 19 Servers
> >=-----
> >>
> >>
> >>
> >> -----------== Posted via Newsfeed.Com - Uncensored Usenet News
> >==----------
> >> http://www.newsfeed.com The #1 Newsgroup Service in the World!
> >> -----= Over 100,000 Newsgroups - Unlimited Fast Downloads - 19 Servers
> >=-----
> >
> >
> >
> >
> >-----------== Posted via Newsfeed.Com - Uncensored Usenet News
==----------
> > http://www.newsfeed.com The #1 Newsgroup Service in the World!
> >-----= Over 100,000 Newsgroups - Unlimited Fast Downloads - 19 Servers
=-----
>
Received on Tue Jul 09 2002 - 07:46:07 CEST

Original text of this message