MLOAD .DML label syntax

Database
Enthusiast

MLOAD .DML label syntax

Hi Guys,

I am doing a upsert using mload and have a question regarding the syntax related to the DML label.

Do we need to give a semicolon at the end of ".DML label label_name" ?

 

This works

.DML Label UPSERT
Do insert for missing update rows;
UPDATE DB.EMP_TGT
..

 

This gives error: "UTY1407 The following SQL statement is invalid for the .DML statement (location40):
Do insert for missing update rows;"

.DML Label UPSERT;
Do insert for missing update rows;
UPDATE DB.EMP_TGT
..

 

However, when i do a simple insert without using the "Do insert for missing rows" keyword. The code still works even with a semicoln at the end of DML label.

This works even with a semicolon:

.DML Label INSERT;
INSERT INTO DB.EMP_TGT
..

Please give your valuable inputs.

 


Accepted Solutions
Teradata Employee

Re: MLOAD .DML label syntax

The MARK, IGNORE, DO INSERT FOR options are part of the .DML LABEL command.

The entire command should end with a semicolon.

1 ACCEPTED SOLUTION
1 REPLY
Teradata Employee

Re: MLOAD .DML label syntax

The MARK, IGNORE, DO INSERT FOR options are part of the .DML LABEL command.

The entire command should end with a semicolon.