DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4

Thread: Loading spread data with sql*loader

  1. #1
    Join Date
    Sep 2000
    Location
    Sao Paulo,SP,Brazil, Earth, Milky Way
    Posts
    350
    I want to load data from a ascii text-file, but the format of the records varies almost wildly. An example :

    Code:
    Tables
    ======
    ALEADUAL Bytes: Total=20480,Free=16384,Used=4096,Qty. Lines=0
    ANALISECERT Bytes: Total=5242880,Free=16384,Used=5226496,Qty. Lines=62929
    ANALISECERT1 Bytes: Total=5242880,Free=3313664,Used=1929216,Qtd. Linhas=58330
    BBCTC12ASB Bytes: Total=1064960,Free=1060864,Used=4096,Qty. Lines=0
    .....
    ......
    Indexes
    =======
    ALEADUAL1 Bytes: Total=1024000,Free=1015808,Used=8192
    ANALISECERT12_I Bytes: Total=5242880,Free=2191360,Used=3051520
    ANALISECERT1_I Bytes: Total=5242880,Free=3387392,Used=1855488
    ANALISECERT_I Bytes: Total=2129920,Free=122880,Used=2007040
    BBVDXPTXT1 Bytes: Total=102400,Free=94208,Used=8192
    ......
    ......
    See, the first and the second lines are titles, the data are the names and the values in each line. The problem is : I can´t use fixed because the length varies, and I can´t use delimited because some fields are separated by commas (like Total and Free), others by ":" and others by spaces.
    Any sugestions ??

    regards,

    J. Laurindo

  2. #2
    Join Date
    Jan 2002
    Location
    Canada
    Posts
    195
    It is always possible. You can try to mass modify your data file by using a never-used-character as your delimitor, such as '=' or '^', instead of comma.

  3. #3
    Join Date
    Apr 2002
    Location
    Phoenix, AZ
    Posts
    175
    I had a similar requirement in different places,
    I used perl and Shell Scripts
    and
    I user PL/SQL in conjuction with Text_IO

    Sridhar R Patnam

  4. #4
    Join Date
    Apr 2002
    Location
    Shenzhen, China
    Posts
    327
    Replace 'Total=' with NULL
    Oracle Certified Master - September, 2003, the Second OCM in China
    *** LOOKING for PART TIME JOB***
    Data Warehouse & Business Intelligence Expert
    MCSE, CCNA, SCJP, SCSA from 1998

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width