sqloader type data date

15 Jul

sqloader type data date
sqloader untuk type data date, langsung saja

1. periksa struktur tabel
SQL> desc scott_xxx;
Name                                      Null?    Type
—————————————– ——– —————————-
MODELID                                   NOT NULL CHAR(10)
PRODUCTID                                 NOT NULL CHAR(4)
TGL                                       NOT NULL DATE

2. periksa file yang akan di-sqlloader-kan
[oracle@xxx ~]$ cat scott_xxx.dat
A01F000000,XXXX,2009-01-02 00:00:00

3. siapkan terlebih dulu control filenya
[oracle@xxx ~]$ cat scott_xxx.ctl
load data
INFILE  scott_xxx.dat
APPEND
into table scott_xxx
fields terminated by “,” OPTIONALLY ENCLOSED BY ‘”‘
(MODELID,
PRODUCTID,
TGL DATE “yyyy-mm-dd hh24:mi:ss” )

4. eksekusi
[oracle@test ~]$ sqlldr userid=scott/***** control=scott_xxx.ctl log=scott_xxx.log

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: