pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Still stuck on a left join
2+ messages / 2 participants
[nested] [flat]

* Still stuck on a left join
@ 2001-06-28 19:51  Ari Nepon <anepon@verveinternet.com>
  0 siblings, 1 reply; 2+ messages in thread

From: Ari Nepon @ 2001-06-28 19:51 UTC (permalink / raw)
  To: pgsql-sql

I've been stuck now on a left join for about two weeks. DB is MSaccess2K,
language is ASP. I'm learning php and PgSQL now, and will be migrating
everything soon. In the mean time. If anyone knows where I am going wrong,
please let me know.

Here is my current SQL query:
SELECT T.ID, T.employee, T.task, T.description, T.hours_used, T.f_date,
P.project_name, C.name
FROM  track AS T LEFT JOIN project AS P ON  (T.project=P.project_id)  LEFT
JOIN clients AS C ON (T.client=C.ID)
WHERE T.client LIKE '%MMColParam%'

Here is the error I get:[Microsoft][ODBC Microsoft Access Driver] Syntax
error (missing operator) in query expression '(T.project=P.project_id) LEFT
JOIN clients AS C ON (T.client=C.ID)'

My DB structure:

I have 5 tables: clients,project,tasks,track,users

rows are as follows:

clients.ID,clients.name
project.project_id,client_id,project_name
tasks.TaskID,tasks.Task_Name
track.ID,track.employee,track.client,track.project,track.task,track.descript
ion,track.hours_used,trck.f_date
users.c_username,users.c_password

Anyone know where I am going wrong?

Thanks,
Ari

~~~~~~~~~~~~~~~~~~~~~~~~~
Ari Nepon
MRB Communications
4520 Wilde Street, Ste. 2
Philadelphia, PA 19127
p: 215.508.4920
f: 215.508.4590
http://www.mrbcomm.com

-----------------------------------------------------------------------
Sign up for our email list and receive free information about
topics of interest to nonprofit communications, marketing, and
community building professionals. Free resources, articles, tips.
Go to http://www.mrbcomm.com and use the Mailing List form.
-----------------------------------------------------------------------




^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Still stuck on a left join
@ 2001-06-28 22:39  Josh Berkus <josh@agliodbs.com>
  parent: Ari Nepon <anepon@verveinternet.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Josh Berkus @ 2001-06-28 22:39 UTC (permalink / raw)
  To: anepon@verveinternet.com; +Cc: pgsql-sql

Ari,

> I've been stuck now on a left join for about two weeks. DB is
> MSaccess2K,
> language is ASP. I'm learning php and PgSQL now, and will be
> migrating
> everything soon. In the mean time. If anyone knows where I am going
> wrong,
> please let me know.

Shame on you!

Seriously, you'd probably spend less time learning how to use PostgreSQL
than on getting around Access2k's "features."

One of these "features" is a fussy query optimizer that frequently
rejects perfectly valid query strings.  This is why I charge my clients
$40/hour more to work with Access2k.

Try monkeying with the parentheses in the JOIN expression:

(a LEFT OUTER JOIN b ON a.1 = b.1) LEFT OUTER JOIN c ON b.2 = c.1

.. may work, where ...

a LEFT OUTER JOIN b ON a.1 = b.1 LEFT OUTER JOIN c ON b.2 = c.1

... does not.

Also try it without aliasing the tables.

If you need further help with MS Access, give me a call ... but I charge
hourly for Microsoft stuff!

-Josh

______AGLIO DATABASE SOLUTIONS___________________________
                                       Josh Berkus
  Complete information technology      josh@agliodbs.com
   and data management solutions       (415) 565-7293
  for law firms, small businesses        fax 621-2533
    and non-profit organizations.      San Francisco



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2001-06-28 22:39 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2001-06-28 19:51 Still stuck on a left join Ari Nepon <anepon@verveinternet.com>
2001-06-28 22:39 ` Josh Berkus <josh@agliodbs.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox