Teradata Temporal Error

Database
Enthusiast

Teradata Temporal Error

I am getting the following error while using the following query:

CURRENT VALIDTIME SELECT * FROM Policy;

 *** Failure 9330 ValidTime qualifier requires at least one table with ValidTime.

                Statement# 1, Info =0 

The table Policy is defined as follows:

   CREATE TABLE Policy(

      Policy_ID INTEGER,

      Customer_ID INTEGER,

      Policy_Type CHAR(2) NOT NULL,

      Policy_Details CHAR(40),

      Validity PERIOD(DATE)

      )

   PRIMARY INDEX(Policy_ID);



How do I get rid of this error?

Tags (1)
4 REPLIES
Teradata Employee

Re: Teradata Temporal Error

What is your TD Version?

Enthusiast

Re: Teradata Temporal Error

TD version is 13.10

Teradata Employee

Re: Teradata Temporal Error

Following should work:

CREATE MULTISET TABLE Policy(

Policy_ID INTEGER,

Customer_ID INTEGER,

Policy_Type CHAR(2) NOT NULL,

Policy_Details CHAR(40),

Validity PERIOD(DATE) AS VALIDTIME

)

PRIMARY INDEX(Policy_ID);

CURRENT VALIDTIME SELECT * FROM Policy;

Added  'AS VALIDTIME' and 'MULTISET'.

Enthusiast

Re: Teradata Temporal Error

Thanks Adeel, it worked.