As usual, the computer is right and I am wrong. The only reason that one
query was coming out "right" is that it just happened the WHERE clause was
never failing. It was just luck that my data was just so.
Regards,
Jerry Schwartz
The Infoshop by Global Information Incorporated
195 Farmington Ave.
I've found yet another oddity with this situation. If I leave the date test
off of both JOINs they give the same number of rows, but they give me the
wrong number! Neither one of them gives me 860 rows returned. I must not
understand how a LEFT JOIN works.
By the way, the EXPLAIN for both of my or
>From: Bill Newton [mailto:[EMAIL PROTECTED]
>Sent: Monday, April 14, 2008 2:09 PM
>To: Jerry Schwartz
>Cc: 'Mysql'
>Subject: Re: LEFT JOIN problem
>
>Hi Jerry,
>
>I think the problem is that NULL is not less than or greater than your
>prod_published date.
Hi Jerry,
I think the problem is that NULL is not less than or greater than your
prod_published date. So you probably have eo_pub_date set to NULL in 56
of your rows.
so for
eo_name_table.eo_pub_date > prod.prod_published
or
eo_name_table.eo_pub_date <= prod.prod_published
mysql will rer
Yes, that is the correct behavior of a LEFT JOIN. A left join keeps
all the record from the original/left table and will link up any
related data from the right table, but if there is no related data,
it sets it to NULL. If you want the join to act as a filter, the just
use regular JOIN.
Hi,
> two tables gi_t and gi
>
> gi_t holds 5 records. gi holds ca. 1500.
>
> I need all from gi for each in gi_t ie LEFT JOIN!!!
> but this:
> SELECT gi.id AS id, overskrift,gidata FROM gi_t LEFT JOIN gi ON
> gi_t.id=gi.gitref WHERE bladref=137
> gives the same as
> SELECT gi.id AS id, oversk
Which table is bladref in?
Regards,
Jerry Schwartz
The Infoshop by Global Information Incorporated
195 Farmington Ave.
Farmington, CT 06032
860.674.8796 / FAX: 860.674.8341
www.the-infoshop.com
www.giiexpress.com
www.etudes-marche.com
> -Original Message-
> From: Kaj Schermer Didrikse
Have a look at the reply I just wrote for Gobi, entitled "Re: Help with an
SQL query". You'll find an explanation there for how to use temporary tables
and joins instead of subqueries in MySQL versions that don't support
subqueries.
Rhino
- Original Message -
From: "Guy Brom" <[EMAIL PRO
2005/11/5, Guy Brom <[EMAIL PROTECTED]>:
> I have the following tables:
>
> languages
> language_id int,
> language_title varchar(80)
>
> objects
> object_id int
> object_language_id int
> object_title varchar(100)
>
> I want to select ALL available languages, and match the translated object
>
* Martijn Tonies
> * me
> > Huh? What would be invalid about it?
>
> That moving parts of the WHERE clause to the JOIN clause returns
> a different result set. But as I said: I don't have the full story ... oh
> wait, I found the first message in my mailbox somewhere.
>
> I guess "OUTER" is opti
> > * Martijn Tonies
> > > * Rory McKinley
> > > > Thanks Roger
> > > >
> > > > That fixed the problem.I was under the impression that I only
had
> to
> > > > put the linked columns n the ON and everything else in the
> WHERElive
> > > > an learn I guess.
> > >
> > > Ehm, I'm not completel
> * Martijn Tonies
> > * Rory McKinley
> > > Thanks Roger
> > >
> > > That fixed the problem.I was under the impression that I only had
to
> > > put the linked columns n the ON and everything else in the
WHERElive
> > > an learn I guess.
> >
> > Ehm, I'm not completely sure, but isn't th
* Martijn Tonies
> * Rory McKinley
> > Thanks Roger
> >
> > That fixed the problem.I was under the impression that I only had to
> > put the linked columns n the ON and everything else in the WHERElive
> > an learn I guess.
>
> Ehm, I'm not completely sure, but isn't this invalid behaviour?
> Thanks Roger
>
> That fixed the problem.I was under the impression that I only had to
put
> the linked columns n the ON and everything else in the WHERElive an
> learn I guess.
Ehm, I'm not completely sure, but isn't this invalid behaviour? Can you post
the DDL and INSERT INTO data for
those who understand binary and those who don't" (Unknown)
- Original Message -
From: "Roger Baklund" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: "Rory McKinley" <[EMAIL PROTECTED]>
Sent: Thursday, November 20, 2003 4:23 PM
Subject: Re: LEF
* Rory McKinley
[...]
> SELECT a.line_number, a.category_value, IFNULL(b.parameter_trigger, 0)
> FROM DB1.Table 1 AS a LEFT JOIN DB2.Table 2 AS b ON
> a.category_name = b.parameter_value
> WHERE a.line_type = 13 AND b.parameter_ID = 13
>
> The only problem is that the query only returns the first t
* Miretsky, Anya
> Select distinct
> biblio.* from biblio left join keyword on
> biblio.p_biblio=keyword.fk_biblio
> where keyword="SOMESTRING";
Try swapping the tables:
Select distinct
biblio.* from keyword left join biblio on
biblio.p_biblio=keyword.fk_biblio
where keyword="SOMESTRING";
The l
possibly
-Original Message-
From: Miretsky, Anya [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 15, 2002 2:32 PM
To: 'Rick Emery'
Subject: RE: Left Join problem - Please Help
When I do this without specifying a left join with just :select biblio.*
from biblio,keyword wher
he mysql list to see what the experts think.
-Original Message-
From: Miretsky, Anya [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 15, 2002 2:17 PM
To: 'Rick Emery'
Subject: RE: Left Join problem - Please Help
Biblio has 11,901 and keyword has 87,971, also I indexed the
Show us your table structure, some table values and the SELECT statement
that works and the one that doesn't
-Original Message-
From: Miretsky, Anya [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 15, 2002 12:13 PM
To: '[EMAIL PROTECTED]'
Subject: Left Join problem - Please Help
Whene
George Eric R Contr AFSPC/CVYZ writes:
> Ok, I can see that now. If the record doesn't exist in the tracked table,
> it can't meet the window criteria.
>
> The one way I see to get around this, in the absense of subselects, is to
> retrieve the tracked data that meets the window criteria into
-
From: George Eric R Contr AFSPC/CVYZ
[mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 03, 2001 12:08 PM
To: [EMAIL PROTECTED]
Subject:RE: Left Join problem
Ok, I can see that now. If the record doesn't exi
al Message-
From: Johnson, Gregert [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 03, 2001 10:03 AM
To: [EMAIL PROTECTED]
Subject: RE: Left Join problem
It looks to me as though the "tracked.window=137" condition is suppressing
output of any "available" rows which
It looks to me as though the "tracked.window=137" condition is suppressing output of
any "available" rows which do not have a target match in "tracked" - tracked.window
would = NULL in those cases.
--Greg Johnson
-Original Message-
From: George Eric R
24 matches
Mail list logo