Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Fri, 17 Aug 2007 @ 23:26:49 GMT


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


Subj:   Re: Parition Elimination with Using Clause
 
From:   Anomy Anom

<-- Anonymously Posted: Friday, August 17, 2007 16:33 -->

Might be improved in R12 but through V2R6.2.x you can't get partition elimination when the partitioning expression values are supplied via host variables. If there's only a single date range, you may be able to work around it with UNIX "here documents" and shell substitution in place of USING. Since your environment appears to be Windows, you may have to find some other way. This should work, for example:

     .import data file='c:\. . . ' ;
     .set titledashes off;
     .export report file='C:\...\tempqry.sql';

     using (from_dt date, to_dt date)
     select
     'select * '||
     'from r621test.clm '||
     'where pd_dt between date'''||
     cast(:from_dt as CHAR(10) FORMAT 'yyyy-mm-dd')||
     ''' and date'''||
     Cast(:to_dt as CHAR(10) FORMAT 'yyyy-mm-dd')||
     ''';' (TITLE '')
     ;
     .export reset;
     .set titledashes on;
     .run file='C:\...\tempqry.sql';


     
  <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