473,387 Members | 1,572 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,387 software developers and data experts.

trnafer date in oracle from text file

hi,
i wana know how can i transfer data from text file in oracle database. it is like stagging. please tell both ways like coding of plsql or any other oracle utility to do this
rizwan
Oct 18 '06 #1
1 1882
hi,
i wana know how can i transfer data from text file in oracle database. it is like stagging. please tell both ways like coding of plsql or any other oracle utility to do this
rizwan
Usual method is using Oracle SQLLoader. You will have to create a Control file defining the stucture of your text file and issue an SQL Loader command on operation system command line.
It is a bit complex to explain vie short message, I offer to look up the SqlLoader manual.

There is a more dirty, and processor - hungry method too, your DBA will eat you out of world doing this on some thousands of records on a multi user database: Generate insert commands from your data, and run these commands as an sql command file. I mean, if your data are something:

AAAA, 1, b
BBBBK, 34, ef

you can use insert sql commands generated into an sql file:

INSERT INTO table_name VALUES (value1, value2,....)
or
INSERT INTO table_name (column1, column2,...) VALUES (value1, value2,....)

If your table is 'my_table' with 3 columns approprieta data type and size, and you have at least insert grant on it you can apply e.g.:

insert into my_table (first_col,my_number,mycode) values ('AAAA',1,'b');
insert into my_table (first_col,my_number,mycode) values ('BBBBK',34,'ef');

etc...
commit;

String literals have to be between apostrophes, numericals not, and don't forget the semicolon on the end of the rows.

Using loader is less hard, but you MUST learn how to create a control file for your data first.
Oct 27 '06 #2

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

Similar topics

3
by: Jan Bols | last post by:
I've been trying to install Oracle 8.1.7 on a fresh Mandrake 9.1 O.S for days, but I'm still not able to get it running. I've tried several install instructions that I found on the internet but no...
4
by: susmita_ganguly | last post by:
Hi I am trying to upgrade from oracle 8i to oracle 9i on the same server ..I don't know much abt migration . Can anyone help me out. Thanks. Susmita
8
by: Ray in HK | last post by:
Will it be possible to specify the date format of type DATE during data loading ?
1
by: ED | last post by:
I currently have an ODBC query that hits an Oracle database. I want to bring back records for a given month based on a job completion date in the Oracle database. I would like to have the user...
13
by: Chris Botha | last post by:
The machine is running XP Pro with all the latest service packs, etc. I must access an Oracle database so I installed the Oracle client stuff. I can query Oracle from a Windows app, no problem....
14
by: peteh | last post by:
Hi All; We have many production jobs that "load from cursor" to a UDB/AIX 8.2 (with dpf) data warehouse from source tables residing Oracle 9i. Since Oracle dates are (roughly) equivalent to DB2...
3
by: Nick048 | last post by:
Hi to All, In order to create a Date Picker that I need to use in Oracle forms, I have modified some element in the source of original calendarPJC provided from Oracle. Following the...
2
by: Yew12 | last post by:
We are trying to get the following script to display the full date and time. The field we are calling does have both date and time in. Unfortunatly its only returning the date. So I tried putting...
1
by: rishka | last post by:
Rishka Mar 17, 5:40 am show options Newsgroups: comp.databases.oracle.tools From: "Rishka" <ris...@webmail.co.za- Find messages by this author Date: 17 Mar 2005 05:40:45 -0800 Local:...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.