dbTalk Databases Forums  

left join problem

comp.databases.postgresql.questions comp.databases.postgresql.questions


Discuss left join problem in the comp.databases.postgresql.questions forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Terry A Haimann
 
Posts: n/a

Default left join problem - 11-03-2006 , 11:07 PM






Ok, I am coming from a mysql background, which I have used for a couple of
years. But now I am wanting to try out PostgreSQL as a learning
experience. Well I have a sql statement which does work in mysql, but not
Postgresql. Can some one tell me why.

Select object.ObjName, const.ConstName, object.DateSeen,
object.TimeSeen, telescope.TelName,
object.Magnification, object.Magnitude, location.Location,
object.Conditions, objtype.ObjType from object, const, objtype
Left Join telescope on object.Telescope = telescope.TelIdx
Left Join location on object.location = location.LocIdx
Where object.ObjCon = const.ConstIdx and
object.ObjType = objtype.ObjTypeIdx;

The databases are identical.

The error is postgre is:

NOTICE: adding missing FROM-clause entry for table "object"
ERROR: JOIN/ON clause refers to "object", which is not part of JOIN

My server is 8.0.3 running on fc4.

The problem is definitely in the left join's, I have removed them and
added table links in my where clause and it works (but not the way I want
it to!)

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.