Need help in BTEQ(Import)

Tools & Utilities
Highlighted
Enthusiast

Re: Need help in BTEQ(Import)

Hello There,

is there any way to put where condition in Bteq import script. I am getting syntax error

*** Failure 3706 Syntax error: expected something between ')' and the 'wher

 e' keyword.

However full file is getting loaded succesfully. I need to filterou some records. Please suggest if any alternate is possible.

.SET ERROROUT STDOUT

.SET QUIET ON

.IMPORT VARTEXT ',' FILE="test.txt";

.REPEAT *

USING

(

id integer,

Name varchar(20)

)

INSERT INTO test_table

values

(

(:id),

(:name)

)

where  id in (sel id from table1);

.logoff;

.QUIT;

Enthusiast

Re: Need help in BTEQ(Import)

In the same script, you can load the records from the file in a staging table and then load the target table from the staged table with the filter condition which you want to apply...