Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Wed, 02 Sep 2009 @ 16:18:07 GMT


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


Subj:   Subqueries Workaround
 
From:   Hitesh Rana

Hi,

I noticed that I can t do sub queries in Teradata.

For example:

     Select  patient_name
     Patient_age,
     Patient_weight,
     (Select Count(*) from drug_taken WHERE drug_name= Warfarin  patient_id=10)
     CountWarfarin,
     (Select Count(*) from drug_taken WHERE drug_name= Heprin  patient_id=10)
     CountHeprin
     FROM patient
     WHERE patient_id=10

So what is the workaround for this? Where I don t have to create a stored procedure.


Thank you,

-Tesh



     
  <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