Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1U2jXp-0004MK-Kl for pgsql-bugs@arkaria.postgresql.org; Tue, 05 Feb 2013 14:30:45 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1U2jXo-000667-EC for pgsql-bugs@arkaria.postgresql.org; Tue, 05 Feb 2013 14:30:44 +0000 Received: from magus.postgresql.org ([87.238.57.229]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1U2cf6-0002qj-P0 for pgsql-bugs@postgresql.org; Tue, 05 Feb 2013 07:09:48 +0000 Received: from mahout.postgresql.org ([98.129.198.123]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1U2cf0-00080i-FP for pgsql-bugs@postgresql.org; Tue, 05 Feb 2013 07:09:48 +0000 Received: from [204.145.124.246] (helo=wrigleys.postgresql.org) by mahout.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1U2cez-0006Mm-9X for pgsql-bugs@postgresql.org; Tue, 05 Feb 2013 07:09:41 +0000 Received: from www-data by wrigleys.postgresql.org with local (Exim 4.72) (envelope-from ) id 1U2cey-0004DC-QS for pgsql-bugs@postgresql.org; Tue, 05 Feb 2013 07:09:40 +0000 Date: Tue, 05 Feb 2013 07:09:40 +0000 Message-Id: Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Subject: BUG #7850: left outer join is not working or I didn't contruct the query properly To: pgsql-bugs@postgresql.org From: nvardar@carrieriq.com X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org The following bug has been logged on the website: Bug reference: 7850 Logged by: Nadir Vardar Email address: nvardar@carrieriq.com PostgreSQL version: 9.0.10 Operating system: linux-gridsql Description:=20=20=20=20=20=20=20=20 I am trying to run below query; SELECT tbl.id, tbl.day, tbl.week, tbl.appfailure, tbl.appname, tbl.deviceid, ext6.DIM_NAME, ext7.DIM_NAME, ext8.DIM_NAME, ext9.DIM_NAME, tbl.starttime FROM APPSTARTEVT tbl left outer join DIM_deviceMakeModel ext6 on (ext6.DIM_ID=3Dtbl.devicemakemodel) left outer join DIM_devicePlatformType ext7 on (ext7.DIM_ID=3Dtbl.deviceplatformtype) left outer join DIM_deviceVersion ext8 on (ext8.DIM_ID=3Dtbl.deviceversion) left outer join DIM_operator ext9 on (ext9.DIM_ID=3Dtbl.operator)=20=20= =20=20 ORDER BY tbl.id ASC throws; >[Error] Script lines: 1-20 ------------------------- ERROR: Node 2 has aborted execution, cause is: com.edb.gridsql.exception.XDBServerException : java.lang.NullPointerException QUERY: SELECT "TMPTT6624_1"."deviceplatformtype" AS "deviceplatformtype","TMPTT6624_1"."XSERIALID0" AS "XSERIALID0","TMPTT6624_1"."XONODEID0" AS "XONODEID0" FROM "TMPTT6624_1"=20 LEFT OUTER JOIN "dim_deviceplatformtype" "ext7" ON ("ext7"."dim_id" =3D "TMPTT6624_1"."deviceplatformtype") WHERE "ext7"."dim_id" IS NULL Line: 1 =03 [Executed: 2/4/13 11:07:08 PM PST ] [Execution: 0/ms]=20 exception. Is there anything i am missing. Query; SELECT tbl.id, tbl.day, tbl.week, tbl.appfailure, tbl.appname, tbl.deviceid, ext6.DIM_NAME, ext7.DIM_NAME, ext8.DIM_NAME, ext9.DIM_NAME, tbl.starttime FROM APPSTARTEVT tbl,=20=20=20=20 DIM_deviceMakeModel ext6, DIM_devicePlatformType ext7, DIM_deviceVersion ext8, DIM_operator ext9 WHERE tbl.devicemakemodel=3Dext6.DIM_ID AND tbl.deviceplatformtype=3Dext7.DIM= _ID AND tbl.deviceversion=3D ext8.DIM_ID AND tbl.operator=3Dext9.DIM_ID ORDER BY tbl.id ASC works btw... Thanks. --=20 Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs