Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Fri, 19 Nov 2004 @ 13:07:58 GMT


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


Subj:   Re: Recursive queries
 
From:   Michael Larkins

Is it possible for you to do this with a UNION ALL?

     select department_no, empid, lastname, firstname, 'Employee'
     from emp_table where empid not in (sel mgr_id from manager_table)
     UNION ALL
     Select department_no, empid, lastname, firstname, 'Manager'
     from emp_table where empid in (sel mgr_id from manager_table)
     order by 1, 5 desc, 3

Just curious.

Michael Larkins
Certified Teradata Master
Certified Teradata SQL Instructor



     
  <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