Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1U2l2J-00057a-8g for pgsql-general@arkaria.postgresql.org; Tue, 05 Feb 2013 16:06:19 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1U2l2I-00048E-CI for pgsql-general@arkaria.postgresql.org; Tue, 05 Feb 2013 16:06:18 +0000 Received: from makus.postgresql.org ([98.129.198.125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1U2l2G-00047q-Vi; Tue, 05 Feb 2013 16:06:17 +0000 Received: from szxga02-in.huawei.com ([119.145.14.65]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1U2l2B-00062l-BI; Tue, 05 Feb 2013 16:06:16 +0000 Received: from 172.24.2.119 (EHLO szxeml213-edg.china.huawei.com) ([172.24.2.119]) by szxrg02-dlp.huawei.com (MOS 4.3.4-GA FastPath queued) with ESMTP id AWU64528; Wed, 06 Feb 2013 00:06:07 +0800 (CST) Received: from SZXEML410-HUB.china.huawei.com (10.82.67.137) by szxeml213-edg.china.huawei.com (172.24.2.30) with Microsoft SMTP Server (TLS) id 14.1.323.7; Wed, 6 Feb 2013 00:06:05 +0800 Received: from blrprnc09ns (10.18.96.98) by szxeml410-hub.china.huawei.com (10.82.67.137) with Microsoft SMTP Server id 14.1.323.7; Wed, 6 Feb 2013 00:06:05 +0800 From: Amit Kapila To: , CC: "'pgsql-general'" References: In-Reply-To: Subject: Re: [BUGS] BUG #7850: left outer join is not working or I didn't contruct the query properly Date: Tue, 5 Feb 2013 21:36:04 +0530 Message-ID: <003c01ce03ba$b379afe0$1a6d0fa0$@kapila@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: Ac4DrXUm9VzTXsNvRpi7El5wAeWb6gADGoYQ Content-Language: en-us X-Originating-IP: [10.18.96.98] X-CFilter-Loop: Reflected X-Pg-Spam-Score: -0.9 (/) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-general Precedence: bulk Sender: pgsql-general-owner@postgresql.org Tuesday, February 05, 2013 12:40 PM nvardar wrote: > I am trying to run below query; >=20 > 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) > ORDER BY > tbl.id ASC >=20 > throws; >=20 > >[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" > LEFT OUTER JOIN "dim_deviceplatformtype" "ext7" ON ("ext7"."dim_id" =3D > "TMPTT6624_1"."deviceplatformtype") WHERE "ext7"."dim_id" IS NULL > Line: 1 =03 >=20 > [Executed: 2/4/13 11:07:08 PM PST ] [Execution: 0/ms] >=20 >=20 > exception. >=20 > Is there anything i am missing. Why the query is different in Exception? Can you try with=20 SELECT tbl.id, tbl.day, tbl.week, tbl.appfailure, tbl.appname, tbl.deviceid, ext6.DIM_NAME, tbl.starttime FROM APPSTARTEVT tbl left outer join DIM_deviceMakeModel ext6 on (ext6.DIM_ID=3Dtbl.devicemakemodel) ORDER BY tbl.id ASC Also as Pavel has pointed, send this to General mailing list.=20 With Regards, Amit Kapila. --=20 Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general