From: | Oliver Elphick <olly(at)lfix(dot)co(dot)uk> |
---|---|
To: | "Michael (dot)" <phifli(at)yahoo(dot)com> |
Cc: | PostgreSQL general list <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: ERROR: JOIN/USING types 'integer' and 'character |
Date: | 2003-12-11 22:38:14 |
Message-ID: | 1071182294.3435.770.camel@linda.lfix.co.uk |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Thu, 2003-12-11 at 20:14, Michael . wrote:
> I had an error before involving a temporary table, and
> that has been taken care of...
> The last message I wrote where it seemed to have
> needed it after I added it was because of different
> \connects. Could someone please help me with this
> next error as I'm importing to a new server?
> I am getting quite a few of these...
>
>
> CREATE VIEW care_plan_note_state AS
> SELECT p.firm_id, p.patient_id, p.visit_id,
> p.problem_id, p.patient_problem_id, p.note,
> p."sequence", p.deleted, p.created, p.mo
> dified, p.edited_by, p.inked, i.visit_id AS visit_in,
> v.inked AS "_inked" FROM ((care_plan_note_history p
> JOIN (SELECT vh.firm_id, v
> h.patient_id, vh.visit_id, vh.disci
...snip...
> ERROR: JOIN/USING types 'integer' and 'character
> varying' not matched
I gave up on trying to follow all the nested brackets - I think you
would help both yourself and us if you formatted such a query!
I think the error means that you are joining on columns of differing
types. (E.g.: SELECT * FROM a JOIN b ON a.id = b.id, where a.id and
b.id are of different types.) That suggests an error in the query or a
discrepancy in the data structures; but if it is intentional, cast one
of them to match the other.
--
Oliver Elphick Oliver(dot)Elphick(at)lfix(dot)co(dot)uk
Isle of Wight, UK http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C
========================================
"The spirit of the Lord GOD is upon me; because the
LORD hath anointed me to preach good tidings unto the
meek; he hath sent me to bind up the brokenhearted, to
proclaim liberty to the captives, and the opening of
the prison to them that are bound."
Isaiah 61:1
From | Date | Subject | |
---|---|---|---|
Next Message | Andrei Ivanov | 2003-12-11 22:43:35 | Re: ERROR: did not find '}' at end of input node (again) |
Previous Message | Tom Lane | 2003-12-11 22:34:48 | Re: ERROR: did not find '}' at end of input node (again) |