Home » RDBMS Server » Server Utilities » Oracle 9i (SQL*LOADER)
Oracle 9i [message #532678] Thu, 24 November 2011 00:36 Go to next message
ravi_n
Messages: 5
Registered: November 2011
Junior Member
Hi Experts,

Could you please help me to load the selected records
from the flat file using SQL*Loader.

I have a flat file it's having 100 records,
I want to load first 10 records from the file
using SQL*LOADER.

Please help me.

Thanks in advance.
Re: Oracle 9i [message #532683 is a reply to message #532678] Thu, 24 November 2011 00:58 Go to previous messageGo to next message
pablolee
Messages: 2881
Registered: May 2007
Location: Scotland
Senior Member
RTFM
Re: Oracle 9i [message #532710 is a reply to message #532683] Thu, 24 November 2011 01:49 Go to previous messageGo to next message
Barbara Boehmer
Messages: 8919
Registered: November 2002
Location: California, USA
Senior Member
You can either use:

load=10

in your command line or use:

options(load=10)

on the first line of your control file.

[Updated on: Thu, 24 November 2011 01:49]

Report message to a moderator

Re: Oracle 9i [message #532718 is a reply to message #532710] Thu, 24 November 2011 02:13 Go to previous messageGo to next message
ravi_n
Messages: 5
Registered: November 2011
Junior Member
Thanks for your help.

If I want to load only 5th record (or) any N th record.
How can we load it.

Please help me.
Re: Oracle 9i [message #532720 is a reply to message #532718] Thu, 24 November 2011 02:20 Go to previous messageGo to next message
Barbara Boehmer
Messages: 8919
Registered: November 2002
Location: California, USA
Senior Member
You can also use skip in your command line:

skip=4

or in your control file:

options(skip=4)

You can combine load and skip. Alternatively, you can load your data into a staging table and use SQL to select the rows that you want to insert into your target table.

Re: Oracle 9i [message #532725 is a reply to message #532720] Thu, 24 November 2011 02:39 Go to previous messageGo to next message
ravi_n
Messages: 5
Registered: November 2011
Junior Member
Thanks for your prompt reply.

Let us say I have a flat file with 50 million records,
Now my requirement is to load every 10 th record.
How can we do that.
Please help me.

Thanks in advance.
Re: Oracle 9i [message #532726 is a reply to message #532725] Thu, 24 November 2011 03:05 Go to previous messageGo to next message
Littlefoot
Messages: 21530
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Your requirements change rather frequently. What problem are you trying to solve, really?
Re: Oracle 9i [message #532727 is a reply to message #532725] Thu, 24 November 2011 03:24 Go to previous messageGo to next message
pablolee
Messages: 2881
Registered: May 2007
Location: Scotland
Senior Member
Your boss should hire someone with the ability to read and think for themselves
Re: Oracle 9i [message #532728 is a reply to message #532725] Thu, 24 November 2011 03:25 Go to previous message
Barbara Boehmer
Messages: 8919
Registered: November 2002
Location: California, USA
Senior Member
ravi_n wrote on Thu, 24 November 2011 00:39


Now my requirement is to load every 10 th record.
How can we do that.


As previously stated, you can load your data into a staging table and use SQL to select the rows that you want to insert into your target table.

Previous Topic: exp and imp
Next Topic: How to Access local file residing at client from DB Server
Goto Forum:
  


Current Time: Wed Feb 19 13:42:11 CST 2020