Path: utzoo!attcan!uunet!snorkelwacker!tut.cis.ohio-state.edu!mailrus!iuvax!purdue!haven!umd5!jay From: jay@umd5.umd.edu (Jay Elvove) Newsgroups: comp.databases Subject: SQL Poser Message-ID: <6588@umd5.umd.edu> Date: 30 May 90 19:50:03 GMT Organization: University of Maryland, College Park Lines: 25 A friend of mine put this question to me: Given a two-column table, where column one is a primary key designating an employee and column two designates his boss, and columns one and two are identical when an employee is his/her own boss; using SQL, how would one go about displaying the chain of command of each employee in the table? Assume each employee can only have one boss. A simple example follows: Given F, the chain A of command is D B A / \ B C / \ D E / \ F G I don't know the answer. -- Jay Elvove jay@umd5.umd.edu c/o Academic Software Comp. Sci. Center, Univ. of Md., College Park