Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Sat, 27 Oct 2007 @ 09:21:27 GMT


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


Subj:   Re: Random Date Updates
 
From:   frank.c.martinez

I would think you'd rather pick a random offset from today. The system calendar has a maximum and minimum date:

     SELECT MIN(calendar_date),
             MAX(calendar_date)
        FROM Sys_Calendar.CALENDAR;

So something like this would not require "going out" to the calendar, and you can adjust the range of dates by adjusting n:

     SELECT DATE + RANDOM(1, n) - n/2;

iv



     
  <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: 15 Jun 2023