Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Wed, 21 May 2003 @ 19:30:11 GMT


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


Subj:   Re: Problem in Macro
 
From:   Dieter N�th

Greene, Thomas L wrote:

  Now I'm confused. I tried several experiments trying to duplicate the behavior you describe. In all cases time did NOT stand still in my macro. I tried TIME, Current_Time, Current_Timestamp, Current_Timestamp(0), etc.  



Running V2R5 on my notebook:

/***
   select current_timestamp;
   sel count(*) from dbc.columnsx,dbc.databases;
   select current_timestamp;
***/

  BTEQ -- Enter your DBC/SQL request or BTEQ command:
select current_timestamp;

  *** Query completed. One row found. One column returned.
  *** Total elapsed time was 1 second.

             Current TimeStamp(6)
--------------------------------
2003-05-21 21:21:31.980000+00:00

  BTEQ -- Enter your DBC/SQL request or BTEQ command:
sel count(*) from dbc.columnsx,dbc.databases;

  *** Query completed. One row found. One column returned.
  *** Total elapsed time was 2 seconds.

    Count(*)
-----------
      293125

  BTEQ -- Enter your DBC/SQL request or BTEQ command:
select current_timestamp;

  *** Query completed. One row found. One column returned.
  *** Total elapsed time was 1 second.

             Current TimeStamp(6)
--------------------------------
2003-05-21 21:21:33.530000+00:00

/***
   select current_timestamp
   ;sel count(*) from dbc.columnsx,dbc.databases
   ;select current_timestamp;
***/

  BTEQ -- Enter your DBC/SQL request or BTEQ command:
select current_timestamp
;sel count(*) from dbc.columnsx,dbc.databases
;select current_timestamp;

  *** Query completed. One row found. One column returned.
  *** Total elapsed time was 1 second.

             Current TimeStamp(6)
--------------------------------
2003-05-21 21:21:30.620000+00:00

  *** Query completed. One row found. One column returned.
    Count(*)
-----------
      293125

  *** Query completed. One row found. One column returned.
             Current TimeStamp(6)
--------------------------------
2003-05-21 21:21:30.620000+00:00

/***
   replace macro test as (
   select current_timestamp;
   sel count(*) from dbc.columnsx,dbc.databases;
   select current_timestamp;
);
***/

  BTEQ -- Enter your DBC/SQL request or BTEQ command:
exec test;

  *** Query completed. One row found. One column returned.
  *** Total elapsed time was 2 seconds.

             Current TimeStamp(6)
--------------------------------
2003-05-21 21:21:34.230000+00:00

  *** Query completed. One row found. One column returned.
    Count(*)
-----------
      293125

  *** Query completed. One row found. One column returned.
             Current TimeStamp(6)
--------------------------------
2003-05-21 21:21:34.230000+00:00

Now *I'm* confused ;-)


  Is there some aspect of the original poster's question that I don't understand?  


You must be running a unique version of Teradata ;-)


  I'm running V2R.05.00.00.14.  



Dieter



     
  <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