As the topic, how do I manipulate the data from the flat file before loading them onto teradata database using BTEQ script.... I'm unsure which part should the manipulation be written onto the bteq script....
USING
------------------------------------------------------
INSERT INTO
------------------------------------------------------
Values
In my opinion, data manipulation should be done here
------------------------------------------------------
Table Name : Jerry
A
-------
| 5 |
| 6 |
| 7 |
-------
Values in the data file,
00005|Jim
0 |Apple
|Loop
Condition:
The data is read from the data file. The row whose first column is 0 or NULL should not be loaded, also the leading 0 should be executed before loading into the table........
Guess:
VALUES
(
IF TRIM(LEADING '0' FROM :A) != NULL OR IF TRIM(LEADING '0' FROM :A) != 0
THEN TRIM(LEADING '0' FROM :A)
,B
,C
);
Aucun commentaire:
Enregistrer un commentaire