Brett M.
Brett M.

Reputation: 11

Problem creating volatile table and inserting data - teradata

I get an error 3707 whenever I try to execute that tells me that it is expecting something like a name or Unicode delimited identifier between the word 'I_SYS_CLM' and the integer keyword. I tried deleting the integer after the I_SYS_CLM and it didn't help

CREATE VOLATILE TABLE ep_three , NO LOG

( I_SYS_CLM  integer  

 , N_COV VARCHAR(10) 

 , Q_DAY_DBY integer

 , Q_DAY_PRC_ELM integer

 , Q_DAY_BFT integer)

        ON COMMIT PRESERVE ROWS;

INSERT INTO ep_three

SELECT

 I_SYS_CLM  integer  

 , N_COV 

 , Q_DAY_DBY 

 , Q_DAY_PRC_ELM 

 , Q_DAY_BFT 

FROM pearl_p.TLTC921_SMY

SELECT 

 I_SYS_CLM

 , N_COV

 , Q_DAY_DBY 

 , Q_DAY_PRC_ELM 

 , Q_DAY_BFT 

FROM pearl_p.TLTC921_SMY

Upvotes: 0

Views: 1872

Answers (1)

JNevill
JNevill

Reputation: 50034

Two problems:

  1. You have the keyword integer hanging out in your select statement, which is nonsense. Run the SELECT portion by itself and fix the errors to solve that in the future.
  2. You have the same SELECT statement listed twice, which doesn't make any sense.

Instead, just:

CREATE VOLATILE TABLE ep_three
    ,NO LOG (
    I_SYS_CLM INTEGER
    ,N_COV VARCHAR(10)
    ,Q_DAY_DBY INTEGER
    ,Q_DAY_PRC_ELM INTEGER
    ,Q_DAY_BFT INTEGER
    ) ON

COMMIT PRESERVE ROWS;

INSERT INTO ep_three
SELECT I_SYS_CLM 
    ,N_COV
    ,Q_DAY_DBY
    ,Q_DAY_PRC_ELM
    ,Q_DAY_BFT
FROM pearl_p.TLTC921_SMY;

Upvotes: 1

Related Questions