You are here: Re: left join issue « PHP SQL « IT news, forums, messages
Re: left join issue

Posted by Pierre on 11/17/06 22:44

KrunoG <REMOVErad.astronomija@gmail.com> wrote:

> In your query you're mixing the logic of sql server and oracle. If you use
> sql server then joins are made within the 'from' part of the statement. In
> Oracle that's made after entering all the tables wanted in the query, in
> 'where' part.
> try this one >

Actually, there is still something that I don't understand, you replaced
my where clause joining table i and c with a left join. However, I would
like that condition to always be joining. To my understanding, left join
returns records of c even if there would be no corresponding record in i
(same with t with the second join). Here I have a table of clients, one
of clients that are registered this year 'i' and one table that keep
track of clients tickets. In my query, I would like to return ticket
counts only for the clients that are registered this year. With your
query it returns tickets for former clients as well.

--
Pierre

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация