Home Page for the TeradataForum

Archives of the TeradataForum

Message Posted: Mon, 16 Jul 2007 @ 14:34:29 GMT

  <Prev Next>  
Next> Last>>  

Subj:   Selecting date without quotes
From:   Anomy Anom

<-- Anonymously Posted: Monday, July 16, 2007 08:06 -->

Hello All,

I have a table with a column Col1 defined as date.

When I query the table as

Sel * from table where col1 = 2007-07-14 , (no quotes in the value) the query doesnt return me any errors.

So what value is teradata assuming in the above query?

I did the following test

     create volatile table test
     (col1 date )
     on commit preserve rows;

     Insert into test (20080716) ;

     sel * from test where col1 = '3908-07-16'  ( since teradata offsets from

          Ans: 3908-07-16

     sel * from test where col1 = 3908-07-16 ;  /* no quotes here */

          Ans : no rows returned

But the above query doesnt prompt a 'failed conversion to numeric' error.

Can you tell me what date is teradata looking at when we say 3908-07-16

Thanks a lot for your responses


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