Re: gone blind - can't see syntax error

From: Mike Rylander <mrylander(at)gmail(dot)com>
To: Gary Stainburn <gary(dot)stainburn(at)ringways(dot)co(dot)uk>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: gone blind - can't see syntax error
Date: 2005-04-01 11:55:34
Message-ID: b918cf3d050401035539b59301@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Apr 1, 2005 11:36 AM, Gary Stainburn <gary(dot)stainburn(at)ringways(dot)co(dot)uk> wrote:
> Hi folks.
>
> I've been looking at this for 10 minutes and can't see what's wrong.
> Anyone care to enlighten me.
>
> Thanks
>
> Gary
>
> [httpd(at)stan webroot]# psql -a -f new-view.sql
> SELECT r.r_id, r.r_registration, r.r_chassis, r.r_vehicle, r.r_fuel,
> r.r_pack_mats, r.r_delivery,
> (date(r.r_delivery) - date(now())) AS r_remaining, r.r_created,
> r.r_completed, r.r_salesman,
> sm.r_salesman as salesman_name,
> d.d_des, de.de_des,
> u.u_id, u.u_userid, u.u_username, u.u_salesman, u.u_target,
> t.t_id, t.t_des,
> s.s_id, s.s_des,
> c.c_id, c.c_des,
> co.com_count, co.com_unseen
> FROM requests r,
^^^
> left outer join users sm on sm.u_id = r.r_salesman,
> left outer join users u on r.r_u_id = u.u_id,
> left outer join request_types t on r.r_t_id = t.t_id,
> left outer join request_states s on r.r_s_id = s.s_id,
> left outer join dealerships d on r.r_d_id = d.d_id,
> left outer join departments de on r.r_de_id = de.de_id,
> left outer join customers c on r.r_c_id = c.c_id,
> left outer join comment_tallies co on r.r_id = co.r_id
> ORDER BY r.r_id;
> psql:new-view.sql:19: ERROR: parser: parse error at or near "left"

Don't put commas between your joins.

--
Mike Rylander
mrylander(at)gmail(dot)com
GPLS -- PINES Development
Database Developer
http://open-ils.org

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Kenneth Gonsalves 2005-04-01 12:01:07 Re: gone blind - can't see syntax error
Previous Message Dinesh Pandey 2005-04-01 11:51:10 Re: gone blind - can't see syntax error