Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 79FCC475BEC for ; Wed, 15 Jan 2003 22:46:50 -0500 (EST) Received: from smtp-server4.tampabay.rr.com (smtp-server4.tampabay.rr.com [65.32.1.43]) by postgresql.org (Postfix) with ESMTP id 501A8475843 for ; Wed, 15 Jan 2003 22:46:49 -0500 (EST) Received: from mattspc ([65.34.52.169]) by smtp-server4.tampabay.rr.com (8.12.2/8.12.2) with ESMTP id h0G3kpeK005965; Wed, 15 Jan 2003 22:46:51 -0500 (EST) From: "Matthew Nuzum" To: "'Stephan Szabo'" , "'Matthew Nuzum'" Cc: Subject: Re: show data from two tables together Date: Wed, 15 Jan 2003 22:46:48 -0500 Organization: Bearfruit.org Message-ID: <000001c2bd11$e76058e0$6700a8c0@mattspc> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.3416 In-reply-to: <20030115191320.R98147-100000@megazone23.bigpanda.com> Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200301/248 X-Sequence-Number: 11113 Hmm... I've never used this before. I'll try it. Thanks for your help and your quick reply! -- Matthew Nuzum www.bearfruit.org cobalt@bearfruit.org > Fortunately we have the set functions, specifically UNION ALL in this > case. > > Maybe something like (minus the number of files/empty part): > > CREATE VIEW viewname AS > SELECT fileid, filename, folderid, dsply_order FROM files > UNION ALL > SELECT folderid, foldername, parentid, dsply_order FROM folders; > > SELECT * from viewname where folderid=23 order by dsply_order;