Home Page for the TeradataForum

Archives of the TeradataForum

Message Posted: Mon, 25 Nov 2002 @ 05:06:04 GMT

  <Prev Next>   <<First <Prev

Subj:   Re: HELP TABLE COMMAND in FastLoad Script
From:   McCall, Glenn D

I am not familiar with the HELP TABLE in context from Fastload. Assuming that it is valid I am guessing that the problem is that you have defined your name column as varchar(12) but you have supplied it in char(12) form in the input file.

You have a couple of options

1. Define the name column to be char(12). You might then encounter a problem with the other fields because fload would probably expect them to be 2 byte integer values in the input file.

2. Introduce a variable length indicator in front of the name column (and probably the record and convert the 2 numbers to 2 byte integers).

3. Create a table defined as empno char(2), name char(12), phone char(4) and fastload into that, then insert select into your target table.

4. Use a define statement.

The define statement for your file would be:

DEFINE empno char(2),
    name char(12),
    phoneno char(4)

Then you could use this insert statement

INSERT INTO emp1 (Empno, Name, PhoneNo) values (:empno, :name, :phoneno);

Note that the DEFINE statement defines the layout of the input file - it does not define the structure of the table. As such, the empno is defined as character 2 because you are using two characters to represent the employee number in the input file.

Personally, I would always use a define statement to explicitly define my input layout. Then use the INSERT statement to explicitly define how data is transferred from the input file to the columns in the table.

Hope this helps

Glenn Mc

  <Prev Next>   <<First <Prev
  Top Home Privacy Feedback  
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 28 Jun 2020