what is wrong in this mload upsert?
Teradata Teradata Discussion Forums Teradata.com Discussion Forum
Visit Teradata.com
Home       Guidelines    Member List
Welcome Guest ( Login | Register )
        


This online forum is for user-to-user discussions of Teradata products, and is not an official customer support channel for Teradata. If you require direct assistance, please contact Teradata support.


what is wrong in this mload upsert? Expand / Collapse
Author
Message
Posted 2/7/2006 3:07:56 PM
Junior Member

Junior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior Member

Group: Forum Members
Last Login: 5/19/2008 1:49:45 PM
Posts: 24, Visits: 12

Hi ,

I am getting the following error in the below mentioned mload upsert.
"UTY0805 RDBMS failure, 3538: A MultiLoad UPDATE Statement is Invalid"

I could not find what is wrong in the update statement of mload script.

Please advise---


.LOGTABLE abc.testaxn_lg;
.DATEFORM ANSIDATE;

.LOGON catabc/abc,*****;

.BEGIN IMPORT MLOAD TABLES abc.testaxn1
WORKTABLES
abc.testaxn_WT
ERRORTABLES
abc.testaxn_E1
abc.testaxn_E2

ERRLIMIT 0

SESSIONS 4
SLEEP 5
TENACITY 1
TABLEWAIT 1;

.LAYOUT customer_layout;

.FIELD CONTRACT_ID * VarCHAR(2);

.FIELD CUSTOMER_ID * VARCHAR(2);

.FIELD ASSET_ID * VARCHAR(2);

.FIELD VENDOR_NAME * VARCHAR(18);


.DML LABEL DML_LABEL
Do insert for missing update rows;
UPDATE abc.testaxn1
SET CONTRACT_ID = :CONTRACT_ID,
CUSTOMER_ID = :CUSTOMER_ID,
ASSET_ID = :ASSET_ID,
VENDOR_NAME = :VENDOR_NAME

WHERE CONTRACT_ID = :CONTRACT_ID;

INSERT into abc.testaxn1 (CONTRACT_ID,
CUSTOMER_ID,
ASSET_ID,
VENDOR_NAME)

VALUES (:CONTRACT_ID,
:CUSTOMER_ID,
:ASSET_ID,
:VENDOR_NAME
);

.IMPORT INFILE c:\data3.txt FORMAT VARText ','
LAYOUT customer_layout APPLY DML_LABEL;

.END MLOAD;

.LOGOFF;
Post #3491
Posted 2/7/2006 7:45:01 PM
Junior Member

Junior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior Member

Group: Forum Members
Last Login: 5/19/2008 1:49:45 PM
Posts: 24, Visits: 12
opps!

My mistake, I was using PI in the update satement.

I corrected and it is working fine.

Post #3494
« Prev Topic | Next Topic »


Reading This Topic Expand / Collapse
Active Users: 5 ( 5 guests, 0 members, 0 anonymous members )
No members currently viewing this topic.


All times are GMT -5:00, Time now is 1:06am

Powered By InstantForum.NET v4.1.4 © 2008
Execution: 0.031. 7 queries. Compression Disabled.