From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Hoosain Madhi <MADHIH(at)vodacom(dot)co(dot)za> |
Cc: | "Pgsql-General(at)Postgresql(dot) Org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: LEFT OUTER JOINS |
Date: | 2000-08-31 14:50:08 |
Message-ID: | 1918.967733408@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hoosain Madhi <MADHIH(at)vodacom(dot)co(dot)za> writes:
> The fact that I request
> c.c7link in the first part of the query, it returns all c7links from
> tbl_c7links. Ideally I should set this to NULL and then request c.c7links in
> the second part of the query (line9). However the parser complains if I
> replace c.c7link with NULL in line 1.
As a general rule, you should provide the exact error message you are
getting when you post a question like this. "The parser complains"
is pretty unhelpful.
I am guessing that the issue is lack of datatype information in the
first select --- UNION currently takes the first select as determining
the types of all its result columns (which is a bug IMHO, but that's
how it acts at the moment). So try casting the NULL to the proper
datatype, eg if the column is text you want "NULL::text" or
"CAST(NULL AS text)".
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Steve Heaven | 2000-08-31 14:57:22 | Re: Error with tcp/ip networking |
Previous Message | Joel Burton | 2000-08-31 14:46:03 | Re: Error installing ODBC in NT |