Escolar Documentos
Profissional Documentos
Cultura Documentos
EXAMPLE SCRIPT
.logon 127.0.0.1/dbc,dbc;
database samples;
DROP TABLE ERR2;
DROP TABLE ERR1;
DROP TABLE DOB_DETAILS;
CREATE TABLE DOB_DETAILS(NAME VARCHAR(20),DOB DATE);
.SET RECORD VARTEXT "|";
DEFINE
NAME (VARCHAR(20)),
DOB (VARCHAR(20))
FILE=c:/details.txt;
SHOW;
BEGIN LOADING DOB_DETAILS ERRORFILES ERR1,ERR2
CHECKPOINT 1000;
INSERT INTO DOB_DETAILS
VALUES
(
:NAME,
:DOB(DATE,FORMAT 'DD-MM-YYYY')
);
END LOADING;
.LOGOFF;
.QUIT;
Creation of flat_file
Delimiter must be used as separater for columns
Demlimiter must be at the end of each row
After the last row press enter
SELECT * FROM SAMPLES.DOB_DETAILS
View the status of fastload when it fails USE THIS QUERY BELOW
Select * from sysadmin.fastlog;
Mload
.logtable samples.dob_details_log;
.logon 127.0.0.1/dbc,dbc;
.layout doblayout;
layout doblayout
apply doblabel;
.end mload;
.logoff;
Script
mload_eg.txt
Before load
After load
FAST EXPORT
example
SYNTAX fexp < filename
Code:
.logtable samples.export_log;
.logon 127.0.0.1/dbc,dbc;
.begin export;
.end export;
.logoff;