Re: basic SQL request

From: "Shoaib Mir" <shoaibmir(at)gmail(dot)com>
To: "Alain Roger" <raf(dot)news(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: basic SQL request
Date: 2006-11-05 19:50:48
Message-ID: bf54be870611051150y735032fck5c779ffedc5828a5@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Check this out:

"= articletype.articletype_id AND"

and in your from clause you have something like this:

"from articles, articletypes, department"

So you need to fix "articletypes" or if it is "articletype"

Regards,
-------
Shoaib Mir
EnterpriseDB (www.enterprisedb.com)

On 11/6/06, Alain Roger <raf(dot)news(at)gmail(dot)com> wrote:
>
> Hi,
>
> i've tried to run a basic SQL request as followed :
> select *
> from articles, articletypes, department
> where
> articles.articletype_id = articletype.articletype_id AND
> articles.department_id = department.department_id AND
> articles.validity_period_end > now()
>
> and i got the following error message :
> ERROR: missing FROM-clause entry for table "articletype"
>
> i'm confused now, if i use LEFTJOIN it's the same, so where is the trouble
> ?
>
> thx,
>
> AL.
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Brent Wood 2006-11-05 20:11:16 Re: Geometry
Previous Message Adrian Klaver 2006-11-05 19:48:01 Re: basic SQL request