X-Original-To: pgsql-sql@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id A2895475FC8 for ; Thu, 17 Apr 2003 10:37:52 -0400 (EDT) Received: from jordgubbe.pingpong.net (81.milagro.bahnhof.net [195.178.168.81]) by postgresql.org (Postfix) with ESMTP id 7F3B6475F1B for ; Thu, 17 Apr 2003 10:37:39 -0400 (EDT) Received: from pingpong.net (localhost [127.0.0.1]) by jordgubbe.pingpong.net (8.12.8p1/8.12.8) with ESMTP id h3HEbf1r044062; Thu, 17 Apr 2003 16:37:41 +0200 (CEST) (envelope-from kudo@pingpong.net) Message-ID: <3E9EBC35.9020904@pingpong.net> Date: Thu, 17 Apr 2003 16:37:41 +0200 From: Patrik Kudo User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.3) Gecko/20030408 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Marco Roda Cc: pgsql-sql@postgresql.org Subject: Re: OUTER JOIN References: <000701c304ed$d78ba7c0$0301a8c0@amdosoft.local> In-Reply-To: <000701c304ed$d78ba7c0$0301a8c0@amdosoft.local> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, hits=-38.2 required=5.0 tests=BAYES_01,EMAIL_ATTRIBUTION,IN_REP_TO,QUOTED_EMAIL_TEXT, REFERENCES,REPLY_WITH_QUOTES,UPPERCASE_25_50, USER_AGENT_MOZILLA_UA autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200304/272 X-Sequence-Number: 12973 Hello I'd probably write the query something like this: SELECT ST.id, ST.order_num, ST.from_time, ST.to_time, ST.disabled, SD.description FROM shift_type ST LEFT OUTER JOIN shift_desc SD ON (ST.id = SD.shift_type_id AND SD.app_language_id = 2) ORDER BY ST.order_num I haven't tried the query, so I'm not all sure it works though =) Regards, Patrik Kudo Marco Roda wrote: > Hallo, > > > and here is the SQL for Oracle: > SELECT ST.id, ST.order_num, ST.from_time, ST.to_time, ST.disabled, > SD.description > FROM shift_type ST, shift_desc SD > WHERE ST.id = SD.shift_type_id(+) AND SD.app_language_id(+) = 2 > ORDER BY ST.order_num >