Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Thu, 01 Mar 2012 @ 22:17:58 GMT


     
  <Prev Next>  
<<First
<Prev
Next> Last>>  


Subj:   VALUE IN a QUERY IS NOT valid
 
From:   filipsil

Could someone explain to me, how TERADATA 13 makes implicit CAST in the query below? the error happened only in the date 0229 that it is a leap year, when I put 0228 the procedure is working perfectly.

     CREATE SET TABLE TB_TESTES ,NO FALLBACK ,
          NO BEFORE JOURNAL,
          NO AFTER JOURNAL,
          CHECKSUM = DEFAULT
          (
           CPF VARCHAR(14) CHARACTER SET LATIN NOT CASESPECIFIC NOT NULL,
           DT_REFERENCIA DATE FORMAT 'YYYY-MM-DD',
           NU_EXECUCAO INTEGER NOT NULL)
     UNIQUE PRIMARY INDEX UK_TBTESTES ( CPF );

     INSERT INTO TB_TESTES
     (
        CPF,
        DT_REFERENCIA,
        NU_EXECUCAO
     )
     SELECT
     CPF
     ,0229
     ,-1
     FROM TB_AUX
     WHERE CD_CPF NOT IN
         (
         SELECT CD_CPF_CNPJ
         FROM TB_TESTES
         );
     *** Failure 3520 A constant VALUE IN a QUERY IS NOT valid FOR COLUMN DT_REFERENCIA.
          Statement# 1, Info =0
     *** Total elapsed TIME was 1 SECOND.

att,

Filipe da Silva
IBM Brasil - GBS / AS



     
  <Prev Next>  
<<First
<Prev
Next> Last>>  
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 27 Dec 2016