This week's book giveaway is in the Open Source forum.
We're giving away four copies of Programmers Guide to Apache Thrift and have Randy Abernethy on-line!
See this thread for details.
Win a copy of Programmers Guide to Apache Thrift this week in the Open Source forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

Loading multiple tables from delimited file  RSS feed

 
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • 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..........
 
What's wrong? Where are you going? Stop! Read this tiny ad:
ScroogeXHTML - small and flexible RTF to HTML converter library
https://coderanch.com/t/710903/ScroogeXHTML-RTF-HTML-XHTML-converter
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!