Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Thu, 07 Jan 2016 @ 13:27:04 GMT


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


Subj:   Incorrect results - WEEK(CURRENT_DATE) and
 
From:   Bodla, Sravan

Hi Forum,

Some of our user reports are defined based on Fiscalweek extraction from current date.

In most of the reports WEEK(CURRENT_DATE) is used and it?s now giving incorrect results.

     sel WEEK(CURRENT_DATE) .

This function is returning the current week as 2, which is not True.

Whereas, if I use

     sel WEEKNUMBER_OF_YEAR (current_date)

the output is 1. --> FW 1. (which is true). My assumption is both the functions should return the output as 1. Can you please clarify?

Also, just curious to know how these results are fetched from the database?

     Sel user
     Sel time
     Select date
     sel WEEKNUMBER_OF_YEAR (current_date)
     DB version: ?TD 14.10 (14.10.06.03_d2d ? patch)

Thanks,

Sravan.

Sravan Kumar Bodla
TERADATA DBA
TERADATA 12 DBA Certified
ITIL V3 Foundation Certified



     
  <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