Re: LEFT JOIN problem

2008-04-14 Thread Bill Newton
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

RE: LEFT JOIN problem

2008-04-14 Thread Jerry Schwartz
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. So you probably have eo_pub_date set to NULL in 56

RE: LEFT JOIN problem

2008-04-14 Thread Jerry Schwartz
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

RE: LEFT JOIN problem

2008-04-14 Thread Jerry Schwartz
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.

Re: left join problem

2008-01-09 Thread Brent Baisley
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.

RE: Left join problem

2007-09-05 Thread Jerry Schwartz
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 Didriksen

Re: Left join problem

2007-09-05 Thread Martijn Tonies
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,

Re: LEFT JOIN problem

2005-11-05 Thread Pooly
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 (if it is

Re: LEFT JOIN problem

2005-11-05 Thread Rhino
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

Re: LEFT JOIN problem

2003-11-20 Thread Roger Baklund
* 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 two

[SOLVED]Re: LEFT JOIN problem

2003-11-20 Thread Nobody
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: LEFT JOIN problem * Rory McKinley [...] SELECT a.line_number

Re: [SOLVED]Re: LEFT JOIN problem

2003-11-20 Thread Martijn Tonies
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

Re: [SOLVED]Re: LEFT JOIN problem

2003-11-20 Thread Roger Baklund
* 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? Huh? What

Re: [SOLVED]Re: LEFT JOIN problem

2003-11-20 Thread Martijn Tonies
* 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?

Re: [SOLVED]Re: LEFT JOIN problem

2003-11-20 Thread Martijn Tonies
* 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

Re: [SOLVED]Re: LEFT JOIN problem

2003-11-20 Thread Roger Baklund
* 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 optional, and

RE: Left Join problem - Please Help

2002-02-15 Thread Rick Emery
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

RE: Left Join problem - Please Help

2002-02-15 Thread Rick Emery
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 keyword column in the keyword

RE: Left Join problem - Please Help

2002-02-15 Thread Rick Emery
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 where p_biblio

RE: Left Join problem - Please Help

2002-02-15 Thread Roger Baklund
* 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 left

RE: Left Join problem

2001-10-03 Thread Johnson, Gregert
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 Contr

RE: Left Join problem

2001-10-03 Thread George Eric R Contr AFSPC/CVYZ
- 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 do not have a target match in tracked

RE: Left Join problem

2001-10-03 Thread Johnson, Gregert
- 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 exist

Re: Left Join problem

2001-10-03 Thread Carl Troein
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 a