• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Loading multiple tables from delimited file

 
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi ppl,
i am using sql loader to load datas to tables. i m using two tables with when clause my code is


for the above ctrl file only first when clause is working. second when clause is not working.
sample data is

For first when clause there ahould be two rows updated in "data" table and one row must be discarded
For second when clause one row should be updated in "tabrow" table and two records must be discarded but all the three records are discarded.
my log for the ctrl file run

SQL*Loader: Release 9.0.1.1.1 - Production on Tue Sep 5 18:52:20 2006

(c) Copyright 2001 Oracle Corporation. All rights reserved.

Control File: D:\Phase1\tempctrl2.ctl
Data File: d:\Phase1\in.csv
Bad File: D:\Phase1\in.bad
Discard File: none specified

(Allow all discards)

Number to load: ALL
Number to skip: 0
Errors allowed: 50
Bind array: 64 rows, maximum of 256000 bytes
Continuation: none specified
Path used: Conventional

Table DATA, loaded when NAME = 0X50(character 'P')
Insert option in effect for this table: REPLACE

Column Name Position Len Term Encl Datatype
------------------------------ ---------- ----- ---- ---- ---------------------
NAME FIRST * , CHARACTER
AGE NEXT * , CHARACTER

Table TABROW, loaded when NAME = 0X45(character 'E')
Insert option in effect for this table: REPLACE

Column Name Position Len Term Encl Datatype
------------------------------ ---------- ----- ---- ---- ---------------------
NAME NEXT * , CHARACTER
AGE NEXT * , CHARACTER

Record 2: Discarded - failed all WHEN clauses.

Table DATA:
2 Rows successfully loaded.
0 Rows not loaded due to data errors.
1 Row not loaded because all WHEN clauses were failed.
0 Rows not loaded because all fields were null.


Table TABROW:
0 Rows successfully loaded.
0 Rows not loaded due to data errors.
3 Rows not loaded because all WHEN clauses were failed.
0 Rows not loaded because all fields were null.


Space allocated for bind array: 66048 bytes(64 rows)
Read buffer bytes: 1048576

Total logical records skipped: 0
Total logical records read: 3
Total logical records rejected: 0
Total logical records discarded: 1

Run began on Tue Sep 05 18:52:20 2006
Run ended on Tue Sep 05 18:52:20 2006

Elapsed time was: 00:00:00.20
CPU time was: 00:00:00.03

Kindly solve my issue.........
It is urgent..........
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic