How to load data from a text file into a table?

Answer Posted / nithya

use SQL LOADER.

type in ur command prompt:
> sqlldr

> sqlldr userid=user/password@DB_INSTANCE_NAME
control=import.ctl log=import.log data=import.csv

where u hav to convert ur text file into comma seperated
file(.csv) and ur control file must be:

load data

infile call_list.csv //data file

append

into table bck_up // db table name

fields terminated by ','

optionally enclosed by'"'

trailing nullcols
(
name,num,num2 //columns in ur text file.
)

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a blob datatype?

646


What is the difference between myisam dynamic and myisam static in mysql?

687


Can you rename a database in mysql?

724


What are the technical features of MySQL?

767


What are the reasons for selecting lamp (linux, apache, mysql, php) instead of combination of other software programs, servers and operating systems?

789


How would concatenate strings in mysql?

718


How many concurrent queries can mysql handle?

659


Which is better mysql or microsoft sql?

632


How do I edit a database in mysql workbench?

676


How to get current MySQL version?

796


Is mysql a odbc?

682


What is mysql aggregate functions? Explain

765


How to extract a unit value from a date and time?

700


What is blob storage?

700


Which is best pdo or mysqli?

664