Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Load two files to two different tables in one FL script

Status
Not open for further replies.

WILLIEWANKA

Technical User
May 22, 2003
42
US
Is it possible? And if so, how? Here is my code, and my log file


sessions 1;
errlimit 25;
logon duh;
DATABASE ud107;

DROP TABLE ERROR_1;
DROP TABLE ERROR_2;
DROP TABLE ERROR_3;
DROP TABLE ERROR_4;

DROP TABLE hist_offer;

CREATE TABLE hist_offer(
CALL_ID INTEGER,
OFR_TYPE_CD CHAR(1),
OFR_RSLT_CD CHAR(1),

)
PRIMARY INDEX( CALL_ID );

DROP TABLE hist_call;

CREATE TABLE hist_call(
CALL_ID INTEGER,
CALL_RSLT_CD CHAR(1),
CALL_CMNTS VARCHAR(255),
CALL_DT DATE
)
PRIMARY INDEX( CALL_ID );


set record vartext;

define

CALL_ID (VARCHAR(9)),
OFR_TYPE_CD (VARCHAR(1)),
OFR_RSLT_CD (VARCHAR(1)),
DELIM (VARCHAR(1))

file=history_offer.dat;

show;

begin loading offer_temp errorfiles error_1, error_2;

insert into offer_temp (
:CALL_ID,
:OFR_TYPE_CD,
:OFR_RSLT_CD
);
end loading;

clear;


define

CALL_ID (VARCHAR(9)),
CALL_RSLT_CD (VARCHAR(1)),
CALL_CMNTS (VARCHAR(255)),
CALL_DT (VARCHAR(10)),
DELIM (VARCHAR(1))

file=history_call.dat;

show;

begin loading hist_call errorfiles error_3, error_4;

insert into hist_call (
:CALL_ID,
:CALL_RSLT_CD,
:CALL_CMNTS,
:CALL_DT (format 'dd-mmm-yy')
);


end loading;
logoff;


And here is the error part of the log file

0022 begin loading u61199_hist_call_temp errorfiles error_3, error_4;

**** 15:18:39 RDBMS error 2635: Error tables are invalid OR
u61199_hist_call_temp is in an invalid state for Load -
===================================================================
= =
= Logoff/Disconnect =
= =
===================================================================
 
Did you ever get this to work? I am having the same problem. I am new to teradata!

Thannks
 
Fastload is fast. Multiload is for the complicated loading, like loading a multiset table, but has a different layout. If you just want 2 simple fastload's at one time, try coding them one at a time(logon fastload logoff, logon fastload logoff). I don't know if this works, we do all our tables fast 1 per job.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top