Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Wed, 17 Jan 2001 @ 19:59:14 GMT


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


Subj:   Re: OR in a WHERE clause
 
From:   Rudel Simard

It'a a pre-defined report. The user can't use a 'List-Boxes' because it's too big (more than 6 000 000 possible values).

The way the developer creates his report lets the report customers customise the report. You are probably see than english is not my native language but let me try to explain the way it's work :

3 parameter are asked to user

period to extract : that's represent the value 990101 and 991231 in the exemple type of 3th parameter : if the user type 1, that's mean the 3th parameter will be compare to COL5_NUSI if the user type 2, that's mean the 3th parameter will be compare to COL6_NUSI value of the NUSI : the value the user want to extract for reporting

Conceptually, its look well. But the OR in the WHERE clause cause the problem.

     SELECT  T1.COL1 (NAMED "c1" ) ,
                     T2.COL2 (NAMED "c2" )

     FROM
         "TABLE2" T2 LEFT OUTER JOIN "TABLE1" T1 ON
          T2."COL3" = T1."COL4")

     WHERE   (1 = 1 AND 25113 = T2.COL5_NUSI OR
             1 = 2 AND 25113 = T1.COL6_NUSI  ) AND
             T2.COL7_NUSI BETWEEN 990101 AND 991231

Rudel Simard
R�gie de l'assurance-maladie du Qu�bec
DBA de l'environnement informationnel



     
  <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