 |
 |
Archives of the TeradataForum
Message Posted: Fri, 19 Nov 2004 @ 13:07:58 GMT
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
| |