X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 5AFA1D1B561 for ; Wed, 10 Sep 2003 16:08:10 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 17744-04 for ; Wed, 10 Sep 2003 13:08:00 -0300 (ADT) Received: from news.hub.org (unknown [64.117.224.194]) by svr1.postgresql.org (Postfix) with ESMTP id C9F77D1B55F for ; Wed, 10 Sep 2003 13:07:59 -0300 (ADT) Received: from news.hub.org (host-64-117-224-194.altec1.com [64.117.224.194] (may be forged)) by news.hub.org (8.12.9/8.12.9) with ESMTP id h8AG7xsl030903 for ; Wed, 10 Sep 2003 16:07:59 GMT (envelope-from news@news.hub.org) Received: (from news@localhost) by news.hub.org (8.12.9/8.12.9/Submit) id h8AG27Wd029112 for pgsql-sql@postgresql.org; Wed, 10 Sep 2003 16:02:07 GMT Reply-To: "PipHans" From: "PipHans" X-Newsgroups: comp.databases.postgresql.sql Subject: Plz, what is the most "correct" method Date: Wed, 10 Sep 2003 18:01:55 +0200 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Lines: 31 Message-ID: <3f5f4af1$0$48889$edfadb0f@dtext02.news.tele.dk> Organization: TDC Internet X-Complaints-To: abuse@post.tele.dk To: pgsql-sql@postgresql.org X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200309/126 X-Sequence-Number: 15104 Hi, Given 2 tables: Table1: id Auto,int,PrimKey table2id int txt nvarchar50 Table2: id Auto,int,PrimKey order int The scenario: Table2.order defines how the table1.txt is should be ordered. Table1.table2id contains the id of the order. This cannot be changed How do I select all Table1.txt values but ordered by their corresponding values of the table2.order field? -- Thx, PipHans --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.516 / Virus Database: 313 - Release Date: 01-09-2003