Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Wed, 02 Sep 2009 @ 17:10:25 GMT


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


Subj:   Re: Subqueries Workaround
 
From:   frank.c.martinez

Rather broad statement, that. You can do all kinds of subqueries. You can't do scalar subqueries (yet, anyway). Well, actually, mi amigo Keith Jones pointed out that you can do a UDF, which could be a sort of a scalar "subquery". But then again, looking at the code, you hard-code the patient id twice. Wouldn't you rather do a correlated subquery, and just do it once? Or maybe just forget the "sub" part of things and join twice (probably an outer join, in case they didn't take either drug) to the drug_taken table. Probably be a little clearer.


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