To read data from a file during query execution

Database
The Teradata Database channel includes discussions around advanced Teradata features such as high-performance parallel database technology, the optimizer, mixed workload management solutions, and other related technologies.

To read data from a file during query execution

Please help me with below scenario.

 

I have data in flat file  : Employee status

Example: 

ID Status

10 Terminated

20 Resigned

10 Sabbatical leave

 

I have to insert data into table using employee table and employee status file

 

INSERT INTO TABLE A

(

Employee id

Employee Name

Status

)

select 

Employee id

Employee Name

<should read from file>

FROM 

Employee table.

 

While inserting data into table A , Employee table has status ID, we should fetch status from file, based on matching ID from employee 

2 REPLIES
rjg
N/A

Re: To read data from a file during query execution

You will find loading your file into a staging table and then using it and employee to load table A will work.

 

Rglass 

Re: To read data from a file during query execution

Thanks for your reply but my requirement is to read the emp status using if from employee table looking up a file called employee-status using id. I should not use any staging table.