Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Tue, 20 Feb 2007 @ 19:41:51 GMT


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


Subj:   Re: SUBSTR query
 
From:   Anomy Anom

<-- Anonymously Posted: Tuesday, February 20, 2007 14:44 -->

Use something like

     CASE WHEN index (mst_fn, '-') > 0
     THEN index (mst_fn, '-')
     ELSE 0
     END

within the SUBSTR to avoid -1. Or try moving the index (mst_fn, '-') > 0

and index (gst_fn, '-') > 0 conditions to the start of the WHERE clause.

In general the optimizer is free to reorder the execution of predicates. Perhaps such optimizations are more likely for SELECT than UPDATE, or maybe you just got lucky.



     
  <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