BTEQ Script is failing

General

BTEQ Script is failing

we have an issue loading the data into a table in Test Environemnt , it's just an incremental load BTEQ script

/***************** Insert record into GTT****************/

INSERT INTO DATABASENAME.TABLENAME1(GTT TABLE)

(

COL1 ,

COL2

)

   SELECT 

                                COL1 ,

        COL2

                FROM 

                                DATABASENAME.TABLENAME2 

                WHERE 

                                 COND='Y'                  

                                AND COL2 IN (  'ABC', 'XYZ'  )                                                          

             AND COND1  >            (SELECT MAX(COND1) FROM DATABASENAME.TABLENAME3 CBC                       

                                                                                                WHERE CBC.COL1 ='ABC' 

                                                                                                AND CBC.COL2  = 'BBC' 

                                                                                                AND CNC.COL3 ='111'    

                                                                                                AND CBC.COND ='Y' 

                                                                                                 AND CBC.COL4 ='LLB');

*** Failure 3807 Object 'DATABASE.TABLENAME1' does not exist.

                Statement# 1, Info =0 

 *** Total elapsed time was 1 second.

Issue noticed

1. GTT Table- TABLENAME1--> NOT CREATED IN THE Test environment

2. Target Table --> the Bteq Script loads --> is also not created 

Resolution

GTT and Target Table  needs to be created right? then the issue will be resolved right?

2 REPLIES
Teradata Employee

Re: BTEQ Script is failing

Indeed you need to have tables created and only then you can use them in SQL.

Re: BTEQ Script is failing

ok thanks Adeel