Archives of the TeradataForum
Message Posted: Thu, 21 May 2009 @ 10:00:50 GMT
<-- Anonymously Posted: Thursday, May 21, 2009 02:41 -->
What is the syntax for reading only the first lilne of a an input file? I need to read in the header record (the very first record in the file which has different layout from the detail records) of a file, then use the processing date within the header record to insert a record into a table.
.IMPORT DATA DDNAME=INFILE apply insert where rec_id = '0'; USING rec_id (CHAR(01)) ,file_date (CHAR(14)) ,process_yy (CHAR(4)) ,process_mm (CHAR(2)) ,process_dd (CHAR(2)) ........ INSERT INTO table_name ( ........ ) ......
The above inserts nothing into the table (although the job ran succesfully)
|Copyright 2016 - All Rights Reserved|
|Last Modified: 23 Jun 2019|