473,386 Members | 1,708 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Inserting Filename Into A Column While Importing

58
Hi ,
i am importing all the text files in a folder into a single table using sqlloader.i need to insert the name of the file that is loaded as a column's value. can anybody help me out. this is the code of the control file that i am using...

options (skip=1)
LOAD DATA
INFILE "FILENAME"
APPEND
INTO TABLE SCOTT.prod
TRAILING NULLCOLS
(
name POSITION(1:10) CHAR TERMINATED BY WHITESPACE,
pid POSITION(20:23) INTEGER EXTERNAL TERMINATED BY WHITESPACE,
pri POSITION(27:27) CHAR TERMINATED BY WHITESPACE,
thd POSITION(30:31) CHAR TERMINATED BY WHITESPACE,
HND POSITION(34:36) CHAR TERMINATED BY WHITESPACE,
PRIV POSITION(39:43) CHAR TERMINATED BY WHITESPACE,
CPUTIME POSITION(49:59) CHAR TERMINATED BY WHITESPACE,
ELAPSDTIME POSITION(63:75) CHAR TERMINATED BY WHITESPACE,
ipaddress constant "FILENAME",
d_date SYSDATE,
time SYSDATE
)

also i need to include time as a column valu.please help me out...
thanks and regards,
jith
Sep 3 '07 #1
1 1343
debasisdas
8,127 Expert 4TB
please specify what is the problem you are facing with this control file.
Sep 3 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: ht | last post by:
Hi! i have a problem. i'm using Visual Basic .Net 2003 Here's the thing. I need to select one folder, without subdirs. (I know that) For every file in that folder i need to create a record...
3
by: Stephen Matthews | last post by:
Help please i have a file which im importing, however it is a single column, the data looks like C8517673505 N7062175 C8517673516 N7062178 C8517673527
2
by: JH | last post by:
I have checked my return strings and all are correct. But when I want to insert them into an Access database table it fails. However, if I change the insert values just to simple strings it works....
2
by: a | last post by:
NEW Post Here's my best guess at how to insert this dataset.... the code runs, but no new records are added to the sql table. I've read and split a delimited text file into a dataset. It...
0
by: Ron Adam | last post by:
Is there a function to find a filename from a dotted module (or package) name without importing it? The imp function find_module() doesn't work with dotted file names. And it looks like it may...
12
by: JMO | last post by:
I can import a csv file with no problem. I can also add columns to the datagrid upon import. I want to be able to start importing at the 3rd row. This will pick up the headers necessary for the...
0
by: RosH | last post by:
Dear All, Please find below an Inserting Event code expected to trigger just before the insert event of a FormView control. Everything works just fine but the event throws an exception that the...
0
by: RosH | last post by:
Dear All, Please find below an Inserting Event code expected to trigger just before the insert event of a FormView control. Everything works just fine but the event throws an exception that the...
1
by: jith87 | last post by:
hi, i am trying to import all the text files in a folder into an oracle database.this database has a primary key which is a combination of 4 fields out of which 2 are imported from the text...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.