Re: Help with left outer join

2012-12-12 Thread Larry Martell
e_id, ep, wafer_id, lot_id, date_time > > My problem is that when data_cst.image_measurer_id is NULL I don't get > that data_cst row even though all the other part of the where clause > are TRUE. I understand why that is, but in that case I want the row, > but with NULL in the da

Re: Help with left outer join

2012-12-12 Thread Larry Martell
On Tue, Dec 11, 2012 at 8:48 PM, Peter Brawley wrote: >>ERROR 1054 (42S22): Unknown column 'data_tool.category_id' in 'on clause' >>But category_id is a column in data_tool. > > Then a bit of reordering is required ... > > SELECT data_target.name, ep, wafer_id, lot_id, >date_time, data_fil

Re: Help with left outer join

2012-12-12 Thread Larry Martell
intentional Cartesian > product. For that case alone, I prefer a comma join > > (Cartesian product example) > SELECT ... > FROM table1, table2 > ... > > Not only is the ANSI syntax the only way to specify an OUTER join (such as > LEFT JOIN or RIGHT JOIN) it forces the

Re: Help with left outer join

2012-12-12 Thread Shawn Green
t for an intentional Cartesian product. For that case alone, I prefer a comma join (Cartesian product example) SELECT ... FROM table1, table2 ... Not only is the ANSI syntax the only way to specify an OUTER join (such as LEFT JOIN or RIGHT JOIN) it forces the author of the statement to recog

Re: Help with left outer join

2012-12-11 Thread Peter Brawley
>ERROR 1054 (42S22): Unknown column 'data_tool.category_id' in 'on clause' >But category_id is a column in data_tool. Then a bit of reordering is required ... SELECT data_target.name, ep, wafer_id, lot_id, date_time, data_file_id, data_cstimage.name, bottom, wf_file_path_id, data_m

Re: Help with left outer join

2012-12-11 Thread hsv
t row even though all the other part of the where clause are TRUE. I understand why that is, but in that case I want the row, but with NULL in the data_cstimage.name column. I think I need a left outer join, but I've been messing with this for hours, and I can't get the syntax right. I

Re: Help with left outer join

2012-12-11 Thread Larry Martell
D data_cst.date_time BETWEEN '2012-09-01 00:00:00' AND '2012-09-07 > 00:00:00' > > ORDER BY target_name_id, ep, wafer_id, lot_id, date_time; Thanks very much for the reply. This is giving me: ERROR 1054 (42S22): Unknown column 'data_tool.category_id' in '

Re: Help with left outer join

2012-12-11 Thread Peter Brawley
a_cst.date_time BETWEEN '2012-09-01 00:00:00' AND '2012-09-07 00:00:00' ORDER BY target_name_id, ep, wafer_id, lot_id, date_time; PB http://www.artfulsoftware.com I think I need a left outer join, but I've been messing with this for hours, and I can't get the syn

Re: What is wrong with this outer join?

2011-10-20 Thread Dotan Cohen
On Thu, Oct 20, 2011 at 16:11, Shawn Green (MySQL) wrote: > We do! First though, are you referencing the online documentation or the > packaged documentation? The reason I ask is that the online documentation > does have some user contributions and comments to go along with the text > itself.  Th

Re: What is wrong with this outer join?

2011-10-20 Thread Peter Brawley
On 10/20/2011 9:11 AM, Shawn Green (MySQL) wrote: On 10/19/2011 20:03, Dotan Cohen wrote: ... Thank you Shawn. I very much appreciate your help, and I also appreciate your employer's initiative to have such a position monitoring the mailing list. Is that an Oracle-created position, or did it

Re: What is wrong with this outer join?

2011-10-20 Thread Shawn Green (MySQL)
On 10/19/2011 20:03, Dotan Cohen wrote: ... Thank you Shawn. I very much appreciate your help, and I also appreciate your employer's initiative to have such a position monitoring the mailing list. Is that an Oracle-created position, or did it exist at Sun as well? MySQL has always encouraged

Re: What is wrong with this outer join?

2011-10-19 Thread Hal�sz S�ndor
;>>> 2011/10/19 17:00 +0200, Dotan Cohen >>>> mysql> select * from beers b outer join colours c on (b.colour = c.ID); ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near

Re: What is wrong with this outer join?

2011-10-19 Thread Dotan Cohen
On Wed, Oct 19, 2011 at 21:10, Shawn Green (MySQL) wrote: > What you are describing is a FULL OUTER JOIN. This is not supported, yet, in > MySQL.  We only support INNER, NATURAL, LEFT, and RIGHT. > > To simulate a FULL OUTER JOIN, you need to construct a UNION of a LEFT and a >

Re: What is wrong with this outer join?

2011-10-19 Thread Shawn Green (MySQL)
On 10/19/2011 13:19, Dotan Cohen wrote: ... Thank you Shawn! I see that I am getting support right from the top! So far as I understand, an outer join should return all matched and unmatched rows (essentially all rows) from both tables. So it is not clear to me what is the difference between a

Re: What is wrong with this outer join?

2011-10-19 Thread Dotan Cohen
On Wed, Oct 19, 2011 at 18:00, Shawn Green (MySQL) wrote: > This is a simple misunderstanding. From the page you quote, the syntax > patterns for an OUTER join are these: > >  | table_reference {LEFT|RIGHT} [OUTER] JOIN table_reference join_condition > >  | table_reference NA

Re: What is wrong with this outer join?

2011-10-19 Thread Shawn Green (MySQL)
olours.ID; ++---++++ | ID | name | colour | id | colour | ++---++++ | 1 | carlsburg | 2 | 2 | green | | 2 | tuburg| 1 | 1 | red| ++---++++ 2 rows in set (0.00 sec) mysql> select * from beers outer join colours on

Re: What is wrong with this outer join?

2011-10-19 Thread Dotan Cohen
s work, however when I convert it to an outer join I get the same error as before: mysql> select * from beers b inner join colours c on (b.colour = c.ID); ++---++++ | ID | name | colour | id | colour | ++---++++ | 1 | carls

What is wrong with this outer join?

2011-10-19 Thread Dotan Cohen
| colour | ++---++++ | 1 | carlsburg | 2 | 2 | green | | 2 | tuburg| 1 | 1 | red| ++---++++ 2 rows in set (0.00 sec) mysql> select * from beers outer join colours on beers.colour = colours.ID; ERROR 1064 (42000): You have an error

Re: Left outer join trouble

2007-10-28 Thread Morten
Martin Gainty wrote: Good Morning- Good afternoon :-) http://www.mysqlperformanceblog.com/2006/09/04/group_concat-useful-group-by- extension/ I did'nt see your where clause ? I'm probably missing your point here. But there's no "where clause" because I want all records from the tickets tab

Re: Left outer join trouble

2007-10-28 Thread Morten
Baron Schwartz wrote: I'm tempted to solve this using a view or two, but would like to know if there's a better way. GROUP_CONCAT() takes an optional DISTINCT modifier, and that might do what you're looking for. It sure does the trick. I'll use that, I was afraid that I was missing somet

Re: Left outer join trouble

2007-10-28 Thread Baron Schwartz
PARATOR ' ') AS CHAR) AS text FROM tickets LEFT OUTER JOIN events AS events ON tickets.id = events.ticket_id LEFT OUTER JOIN taggings AS taggings ON taggings.taggable_id = tickets.id LEFT OUTER JOIN tags AS tags ON taggings.tag_id = tags.id GROUP BY id; The problem with this query is,

Left outer join trouble

2007-10-28 Thread Morten
7;) AS CHAR) AS text FROM tickets LEFT OUTER JOIN events AS events ON tickets.id = events.ticket_id LEFT OUTER JOIN taggings AS taggings ON taggings.taggable_id = tickets.id LEFT OUTER JOIN tags AS tags ON taggings.tag_id = tags.id GROUP BY id; The problem with this query is, that it return

Re: Outer Join with Criteria

2007-05-15 Thread Sebastian Mendel
Ed Since schrieb: > Hello, I'm wondering if this is the most effective way of doing an outer > join with 'extra criteria' (I don't feel like it's the best way): > > SELECT e.EventID, ue.Contact, ut.Discount > FROM Event e > LEFT OUTER JOIN > (SELEC

Outer Join with Criteria

2007-05-15 Thread Ed Since
Hello, I'm wondering if this is the most effective way of doing an outer join with 'extra criteria' (I don't feel like it's the best way): SELECT e.EventID, ue.Contact, ut.Discount FROM Event e LEFT OUTER JOIN (SELECT EventID, Contact FROM UserEvent WHERE UserId

Re: outer join question

2007-02-05 Thread KMiller
a.rhrssid = b.sid)) > where a.rhrqsid = 101 or a.rhrssid = 101 > > Thanks, > ViSolve DB Team > > > > - Original Message - > From: "KMiller" <[EMAIL PROTECTED]> > To: > Sent: Tuesday, February 06, 2007 8:37 AM > Subject: outer join quest

Re: outer join question

2007-02-05 Thread ViSolve DB Team
- Original Message - From: "KMiller" <[EMAIL PROTECTED]> To: Sent: Tuesday, February 06, 2007 8:37 AM Subject: outer join question This query isn't what I want... select a.rhrqid,a.rhrqsid,a.rhrssid,b.sid,b.rlsid from rqhistory a left join relay b on a.rhrqsid = 101 o

outer join question

2007-02-05 Thread KMiller
s all rows from 'a' regardless of the criteria 101 Any advice on how would I get only rows from 'a' that match 101 and any in 'b' that match if they exist? -km -- View this message in context: http://www.nabble.com/outer-join-question-tf3178361.html#a8819711 Sent fr

Re: Full outer join

2006-03-19 Thread Michael Stassen
Maurice van Peursem wrote: Hello, I like to have a full outer join. if you have the following tables: t1: id | val 1 | A 2 | B t2: id | val 1 | B 2 | C SELECT t1.id, t2.id, t1.val FROM t1 FULL OUTER JOIN t2 ON t1.val=t2.val ORDER BY t1.id,t2.id I want to get the following result

Full outer join

2006-03-19 Thread Maurice van Peursem
Hello, I like to have a full outer join. if you have the following tables: t1: id | val 1 | A 2 | B t2: id | val 1 | B 2 | C SELECT t1.id, t2.id, t1.val FROM t1 FULL OUTER JOIN t2 ON t1.val=t2.val ORDER BY t1.id,t2.id I want to get the following result (and in this order): t1.id

Status of OUTER JOIN bug 1591?

2005-12-21 Thread Josh Trutwin
" in the bug database? I am trying to draft > > a document for persuading someone to support MySQL 5.0 in their software > > and wanted to use this example as a major fix made in the database server. > > > > Thread reference: > > http://archives.neohapsis.com/a

Re: classic outer join problem

2005-05-24 Thread mfatene
Hi Hank, I think your problem is to find all the files under /uploads by a command like : cd /uploads ls -lR | grep ".doc" >files.txt then load the files.txt into a temporary table TEMPtable that you create for this issue (see http://dev.mysql.com/doc/mysql/en/load-data.html), after truncating it

Re: classic outer join problem

2005-05-24 Thread SGreen
Hank <[EMAIL PROTECTED]> wrote on 05/24/2005 05:02:47 PM: > I have a table of school class assignments with the following fields - > the first four fields are the primary key: > > Year (int) > Term (enum, "Spring", "Fall","Winter") > ClassID (int) > SectionID (int) > Attachement (varchar 225) >

classic outer join problem

2005-05-24 Thread Hank
I have a table of school class assignments with the following fields - the first four fields are the primary key: Year (int) Term (enum, "Spring", "Fall","Winter") ClassID (int) SectionID (int) Attachement (varchar 225) The "attachment" field is a pointer to a file in the OS of an uploaded file,

innodb, optimizer and outer join

2005-04-22 Thread Boyd E. Hemphill
. What I would like to know is can I depend on the performance being the same, or is the optimizer doing something different b/c of the outer join? I seem to remember something about it not using the index all the time or forcing a full table scan in some cases. Since Hibernate seems to

Re: innodb, optimizer and outer join

2005-04-22 Thread David Griffiths
optimizer doing something different b/c of the outer join? I seem to remember something about it not using the index all the time or forcing a full table scan in some cases. Since Hibernate seems to using only an outer join rather than a join, I would like this concern put to rest. Thanks for an

Re: FULL OUTER JOIN

2005-04-05 Thread SGreen
[EMAIL PROTECTED] wrote on 04/04/2005 01:14:23 PM: > Hello all, > > mysql 4.0.20 > > I'd like to know how one can do a "full outer join". > I've read some workaround with a UNION, but i need the join only on a few > columns, while UNION will make do

FULL OUTER JOIN

2005-04-04 Thread Vincent . Badier
Hello all, mysql 4.0.20 I'd like to know how one can do a "full outer join". I've read some workaround with a UNION, but i need the join only on a few columns, while UNION will make double tuple if one column is not the same. I also would like to avoid temporary table if

Re: Q: outer join w/restriction

2004-10-14 Thread Martin Gainty
IL PROTECTED]> Sent: Thursday, October 14, 2004 8:41 AM Subject: Re: Q: outer join w/restriction > In article <[EMAIL PROTECTED]>, > "Martin Gainty" <[EMAIL PROTECTED]> writes: > > > "You should generally not have any conditions in the ON part that are

Re: Q: outer join w/restriction

2004-10-14 Thread Harald Fuchs
In article <[EMAIL PROTECTED]>, "Martin Gainty" <[EMAIL PROTECTED]> writes: > "You should generally not have any conditions in the ON part that are used to > restrict which rows you want in the result set, but rather specify these conditions > in the WHERE clause" > Forgive me for following the

Re: Q: outer join w/restriction

2004-10-13 Thread Martin Gainty
PROTECTED] To: Martin Gainty Cc: [EMAIL PROTECTED] ; [EMAIL PROTECTED] Sent: Wednesday, October 13, 2004 10:33 AM Subject: Re: Q: outer join w/restriction Martin, you are correct in how you determine when to use AND and when to use OR, but that's not what the original query was

RE: Q: outer join w/restriction

2004-10-13 Thread Christopher J. Mackie
al Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 13, 2004 10:33 AM To: Martin Gainty Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: Q: outer join w/restriction Martin, you are correct in how you determine when to use AND and when to use OR, but

Re: Q: outer join w/restriction

2004-10-13 Thread SGreen
> ~John Nash PhD~ > - Original Message - > From: "Harald Fuchs" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Wednesday, October 13, 2004 8:37 AM > Subject: Re: Q: outer join w/restriction > > > > In article > <[EMAIL

Re: Q: outer join w/restriction

2004-10-13 Thread Martin Gainty
sage - From: "Harald Fuchs" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, October 13, 2004 8:37 AM Subject: Re: Q: outer join w/restriction > In article <[EMAIL PROTECTED]>, > "Christopher J. Mackie" <[EMAIL PROTECTED]> writes: &g

RE: Q: outer join w/restriction

2004-10-13 Thread Christopher J. Mackie
e's something I'm not getting about how to put a SELECT restriction on a query with an outer join. The following query: >> SELECT Applicants.AppID, Applicants.Name, Applicants.Email, >> Reviews.Quant, Reviews.Qual FROM ApplicantStatus INNER JOIN Applicants >&g

Re: Q: outer join w/restriction

2004-10-13 Thread Harald Fuchs
In article <[EMAIL PROTECTED]>, "Christopher J. Mackie" <[EMAIL PROTECTED]> writes: > There's something I'm not getting about how to put a SELECT restriction on a query > with an outer join. The following query: > SELECT Applicants.AppID, Applicants

Q: outer join w/restriction

2004-10-12 Thread Christopher J. Mackie
There's something I'm not getting about how to put a SELECT restriction on a query with an outer join. The following query: SELECT Applicants.AppID, Applicants.Name, Applicants.Email, Reviews.Quant, Reviews.Qual FROM ApplicantStatus INNER JOIN Applicants ON Applic

Re: OUTER JOIN bug in 5.0.1?

2004-09-21 Thread SGreen
INNER JOIN enrollment e > > on e.tech_id = s.tech_id > > INNER JOIN class c > > on c.c_id = e.c_id > > LEFT JOIN class_attended ca > > on ca.c_id = c.c_ID > > WHERE s.tech_ID = 253542 > > AND c.term_id = 4 > > AND c.class_date < NOW() > > GROUP BY 1,2,3,4 > > Based on the description above this isn't quite what I need. I don't > need to GROUP at all, just get the right OUTER JOIN clause to do this. > > > I think we are close. > > Agreed, many thanks for your persistance in helping with this! > > Josh

Re: OUTER JOIN bug in 5.0.1?

2004-09-21 Thread Josh Trutwin
AND c.class_date < NOW() > GROUP BY 1,2,3,4 Based on the description above this isn't quite what I need. I don't need to GROUP at all, just get the right OUTER JOIN clause to do this. > I think we are close. Agreed, many thanks for your persistance in helping with this! Josh -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: OUTER JOIN bug in 5.0.1?

2004-09-21 Thread SGreen
Josh Trutwin <[EMAIL PROTECTED]> wrote on 09/21/2004 09:40:03 AM: > On Tue, 21 Sep 2004 08:57:21 -0400 > [EMAIL PROTECTED] wrote: > > > > > > Perhaps another example would help. I've been trying to re-write > another join query that's designed to produce an attendance record for > each stude

Re: OUTER JOIN bug in 5.0.1?

2004-09-21 Thread Josh Trutwin
happen in this order, we > couldn't do an outer join of two tables and look for a null result > in the outer table to determine non-matching rows. The third set of > filters to be applied comes from the HAVING clause. HAVING > conditions are applied after every other portion of the q

Re: OUTER JOIN bug in 5.0.1?

2004-09-21 Thread SGreen
le declarations to build a virtual table that consists of all columns from each of the participating tables and each combination of rows that meets the ON conditions. If table A has 5 rows and table B has 50 rows and the ON conditions force a match of at most 2 records from table B to each record in t

Re: OUTER JOIN bug in 5.0.1?

2004-09-20 Thread Josh Trutwin
On Mon, 20 Sep 2004 10:25:16 -0400 [EMAIL PROTECTED] wrote: > I think you missed my point. I think the 5.0.1 behavior was correct > and the others are wrong. There is a known bug (or two) about mixing > outer joins and inner joins and it looks like it may be fixed. IF > you want to see all of the

Re: OUTER JOIN bug in 5.0.1?

2004-09-20 Thread SGreen
to the > > internal "working table" only if they meet the ON condition of the > > RIGHT JOIN. > > > > Here is a logically equivalent way of reformatting your original > > FROM clause > > > > FROM assignment a > > LEFT JOIN submitted_assi

Re: OUTER JOIN bug in 5.0.1?

2004-09-20 Thread Josh Trutwin
> on e.tech_ID = sa.tech_ID Yes, I tried re-arranging things like this, and as it is above I think it's more readable, but I was unable to get any results that resembled an outer join. Unfortunately I cannot test this out at the moment due to other issues. Thanks for yo

Re: OUTER JOIN bug in 5.0.1?

2004-09-20 Thread SGreen
Sounds like your 4.0.20 may be the buggy installation... let me see if I can explain. Let's analyze your FROM clause and imagine there is no WHERE clause, for the moment: FROM student s INNER JOIN enrollment e ON e.tech_id = s.tech_id INNER JOIN submitted_assignment sa ON sa.tech_id = s.tech_id

OUTER JOIN bug in 5.0.1?

2004-09-17 Thread Josh Trutwin
Is there a known bug with outer joins in MySQL 5.0.1? I tried the following query on 5.0.1: SELECT s.tech_id, s.full_name, sa.points_awarded, sa.date_submitted FROM student s INNER JOIN enrollment e ON e.tech_id = s.tech_id INNER JOIN submitted_assignment sa ON sa.tech_id = s.tech_id RIGHT JOIN

Re: mysql and leftt outer join

2004-09-11 Thread Michael Stassen
able, the record will not be selected. So one has to use a left outer join. The problem is I can get a left outer join to work that links two table, but not more. It's hard to say what you did wrong without seeing your query. So how woulds you construct the above select to use only left out

mysql and leftt outer join

2004-09-11 Thread Terry A. Haimann
= Camera.CameraIdx)); The problem with doing this is that if any of the lookup indexes are null (such as Photos.PhotographerIdx, Photos.PhotoTypeIdx or Photos.CameraIdx) or point to a nonexistent record in the lookup table, the record will not be selected. So one has to use a left outer join. The problem is I

RE: Possible problem with outer join in 4.1.2

2004-06-11 Thread SGreen
cc: "'Mysql'" <[EMAIL PROTECTED]> 06/11/2004 04:01 Fax to:

RE: Possible problem with outer join in 4.1.2

2004-06-11 Thread Rick Robinson
--Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, June 11, 2004 3:05 PM To: [EMAIL PROTECTED] Cc: Mysql Subject: Re: Possible problem with outer join in 4.1.2 Hi Rick, First, the MySQL IsNULL() function does not operate like the ORACLE or MS SQL version. It

Re: Possible problem with outer join in 4.1.2

2004-06-11 Thread SGreen
else coalesce(b.descr, 'null descr') end descr from transactions a left outer join ref_info b on a.rateplan = b.rateplan and a.rangeid = b.rangeid and a.trandate > b.effdate left join ref_info c on c.rateplan = b.rateplan and c.rangeid = b.rangeid

Possible problem with outer join in 4.1.2

2004-06-11 Thread Rick Robinson
Hi all- I'm not certain if this is a bug in MySQL, a bug in Oracle, or a possible miscoding of my outer join, but I have a scenario in which I've replicated a table set up and query from an Oracle application and I'm not getting the same result set. The following script sets up the

Re: Left outer join combined with inner join

2004-06-01 Thread SGreen
all Products and all Tags (having data all across where they match-up and having nulls in the columns where they don't until the query engine supports the FULL OUTER JOIN clause. Now, there IS a work-around using a LEFT JOIN UNIONed to a RIGHT JOIN but I don't know what version of MySQ

Re: Left outer join combined with inner join

2004-06-01 Thread gerald_clark
products and in the tag column they should have a tag if there is one. I can do the left outer join to join the product and many-to-many table ProductTag: select Product.id, ProductTag.TagId from Product left join ProductTag on Product.id = ProductTag.productId select Product.id,Product.cost,Tag.tag

Left outer join combined with inner join

2004-06-01 Thread Matthew Shalorne
they should have a tag if there is one. I can do the left outer join to join the product and many-to-many table ProductTag: select Product.id, ProductTag.TagId from Product left join ProductTag on Product.id = ProductTag.productId but how do I then, in the same, select statement describe the

Re: outer join

2004-05-18 Thread Mike Hillyer
The (+) indicates an OUTER JOIN. This should work: SELECT A1.store_name, SUM(A2.Sales) SALES FROM Georgraphy A1 LEFT JOIN Store_Information A2 ON A1.store_name = A2.store_name GROUP BY A1.store_name; Scott Purcell wrote: Hello, I am working through a sql tutorial, and would like to perform this

outer join

2004-05-18 Thread Scott Purcell
Hello, I am working through a sql tutorial, and would like to perform this (written for oracle) outer join using mysql. SELECT A1.store_name, SUM(A2.Sales) SALES FROM Georgraphy A1, Store_Information A2 WHERE A1.store_name = A2.store_name (+) GROUP BY A1.store_name I am reading the docs

RE: MySQL outer join with substring_index() function

2004-01-29 Thread Nathan Christiansen
I just answered my own question with tinkering around with the sql statement. The solution is: select t2.*, t3.name from table1 t1, table2 t2 left outer join table3 t3 on ( t3.prid = substring_index(t2.weird, '-', 1) and t3.cid = substring_inde

MySQL outer join with substring_index() function

2004-01-29 Thread Nathan Christiansen
I am having a terrible time trying to understand the outer join syntax for MySQL (Our sever version is: 3.23.56). I have three tables I want to join two of which by inner joins and the other by an outer join. Here are my example tables: table1: +--+--+ | id | key

Re: Left Outer Join?

2004-01-24 Thread Paul DuBois
At 14:20 +0100 1/22/04, Frederic Wenzel wrote: Mike Mapsnac wrote: What is the difference between Left Join and Left Outer Join? Thanks If I get it right, there is none. Greetings Fred You got it right. There is none. -- Paul DuBois, MySQL Documentation Team Madison, Wisconsin, USA MySQL AB

Re: Left Outer Join?

2004-01-22 Thread Frederic Wenzel
Mike Mapsnac wrote: What is the difference between Left Join and Left Outer Join? Thanks If I get it right, there is none. Greetings Fred -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Left Outer Join?

2004-01-22 Thread Mike Mapsnac
What is the difference between Left Join and Left Outer Join? Thanks

Cross dependency found in OUTER JOIN

2004-01-20 Thread Verdon Vaillancourt
lunteer_id = availability.volunteer_id WHERE volunteers.volunteer_id > 0 AND phone_numbers.number LIKE '%345%' AND availability.start_time <= 0 AND availability.end_time >= 0 AND availability.day_of_week = 1 ORDER BY volunteer_id SQL Error: Cross dependency found in OUTER JOIN. Exami

Re: Outer join question

2004-01-20 Thread Craig A. Finseth
First, you database design. You don't need to separate actresses from actors... Why do that? They are the same entity, a person, with only one different attribute: the genre. So, you should join them in one single table: ... Actually, it is possible to be female and to be an Ac

[Fwd: Re: Outer join question]

2004-01-20 Thread Diana Soares
DA.act_id=A.act_id) Please, read the manual about LEFT JOIN. > > My grey-haired memory tells me that an outer join for both the actor table > > and the actress table is the answer, in that the query will return all > > titles *even if* one or both fields are NULL. (At leas

Re: Outer join question

2004-01-20 Thread Diana Soares
actr_id fields in the DVD table. With this design, you could use: SELECT M.title, A.name, A.genre, DA.leader FROM DVD AS M LEFT JOIN DVD_Actors AS DA ON (M.dvd_id=DA.dvd_id) LEFT JOIN Actors AS A ON (DA.act_id=A.act_id) Please, read the manual about LEFT JOIN. > > My grey-haired

Re: Outer join question

2004-01-19 Thread daniel
> [EMAIL PROTECTED] wrote: >>> DVD_Actor: >>> dvd_ID REFERENCES DVD >>> actor_ID REFERNCES Actor >> >> Is this how you setup a join table ? > > Yes. > > >> what exactly is the references keyword ? > > It indicates a foreign key. Full syntax is something like: > dvd_ID CONSTRAINT dvc_fk FOREIGN KEY

Re: Outer join question

2004-01-19 Thread Jochem van Dieten
[EMAIL PROTECTED] wrote: DVD_Actor: dvd_ID REFERENCES DVD actor_ID REFERNCES Actor Is this how you setup a join table ? Yes. what exactly is the references keyword ? It indicates a foreign key. Full syntax is something like: dvd_ID CONSTRAINT dvc_fk FOREIGN KEY REFERENCES DVD (dvd_ID) Read the ma

Re: Outer join question

2004-01-19 Thread daniel
> > DVD_Actor: > dvd_ID REFERENCES DVD > actor_ID REFERNCES Actor > Is this how you setup a join table ? what exactly is the references keyword ? -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: Outer join question

2004-01-19 Thread Jochem van Dieten
Bjorn Barton-Pye wrote: I am using a test database to teach myself MYSQL and am using my DVD collection as the subject. I have 3 tables in this example: Actresses === actr_id name Actors == acto_id name DVD == Title acto_id actr_id The acto_id and actr_id in the DVD table indicates the

Re: Outer join question

2004-01-19 Thread daniel
> so soemthing like > > select * from dvd left join actresses actr on actr.actr_id=dvd.actr_id > left join actors acto on acto.acto_id=dvd.acto_id or by dvd.title > > totally forgot, to get a really good query especially when you use Innodb it doesnt like null values on foreign keys, i'd setup a r

Re: Outer join question

2004-01-19 Thread daniel
> So, can somebody please correct the following query (and explain the > syntax) so that it will work please? (I haven't tried putting an outer > join in it because I don't understand the syntax.) > > Select > actr.name, > acto.name, > dvd.t

Outer join question

2004-01-19 Thread Bjorn Barton-Pye
g > leading actor and/or actress name, but a straightforward join will only > return those movie titles that have NOT NULL values in BOTH the acto_id > and actr_id fields in the DVD table. > > My grey-haired memory tells me that an outer join for both the actor table > and the actr

Outer join question

2004-01-19 Thread Bjorn Barton-Pye
fields in the DVD table. My grey-haired memory tells me that an outer join for both the actor table and the actress table is the answer, in that the query will return all titles *even if* one or both fields are NULL. (At least that was the case when I was using Oracle!) So, can somebody please c

left outer join query -- maybe?

2003-11-06 Thread Charles Haven
Hello all, I have three queries that I need to join together and cannot figure out how. The first query returns 161 records and I want all these records with nulls in the fields added with queries 2 and 3. Any help will be greatly appreciated!!

RE: OUTER JOIN

2003-06-18 Thread David Shelley
Try something like select distinct S.US_FOLIO US_FOLIO , ifnull(SD.US_FOLIO,'false') FOLIO2 from SEGUIMIENTO S LEFT OUTER JOIN SEGUIMIENTO_DETALLE SD on (S.US_FOLIO=SD.US_FOLIO) -Original Message- From: Gus

OUTER JOIN

2003-06-18 Thread Gustavo Mejia
Hi, I am trying to do something like: select distinct S.US_FOLIO US_FOLIO , ifnull(SD.US_FOLIO,'false') FOLIO2 from SEGUIMIENTO S ,SEGUIMIENTO_DETALLE SD where S.US_FOLIO=SD.US_FOLIO(+) this is using Oracle, bu

Re: SELECT query with OUTER JOIN - problem

2003-06-03 Thread Jim Winstead
eduled start dates for courses (which are in the second table). > I tried something like this: > SELECT c_d.*, MIN(c_s.start) as start FROM course_data c_d RIGHT OUTER JOIN > course_start c_s ON c_s.courseid=c_d.courseid WHERE c_s.start>NOW() GROUP BY > c_s.courseid > But this retur

Re: Bug in RIGHT OUTER JOIN?

2003-06-02 Thread Victoria Reznichenko
Harald Fuchs <[EMAIL PROTECTED]> wrote: > Either I misunderstand what a RIGHT OUTER JOIN does, or MySQL has a bug. > Consider the following example: > [skip] > > This looks somewhat like the cartesian product of t3 with (t1 left > join t2). I would expect t3 le

SELECT query with OUTER JOIN - problem

2003-06-02 Thread Dejan Milenkovic
this: SELECT c_d.*, MIN(c_s.start) as start FROM course_data c_d RIGHT OUTER JOIN course_start c_s ON c_s.courseid=c_d.courseid WHERE c_s.start>NOW() GROUP BY c_s.courseid But this return only courses that have start date if I replace ON condition with 1=1 I get list of all courses but with the s

RE: left outer join

2003-02-28 Thread Rob
EMAIL PROTECTED] Sent: Friday, February 28, 2003 3:11 PM To: Rob Cc: [EMAIL PROTECTED] Subject: Re: left outer join Hi, You have one thing wrong in your query... You're using LEFT JOIN but then you use a condition over DFL in the where clause. That's why it doesn't give you the results expec

RE: left outer join

2003-02-28 Thread Rob
EMAIL PROTECTED] Sent: Friday, February 28, 2003 3:11 PM To: Rob Cc: [EMAIL PROTECTED] Subject: Re: left outer join Hi, You have one thing wrong in your query... You're using LEFT JOIN but then you use a condition over DFL in the where clause. That's why it doesn't give you the results

RE: left outer join

2003-02-28 Thread Andrew
id >WHERE DFL.document_id = 37 >AND DF.is_generic = 1 >-Original Message- >From: Rob [mailto:[EMAIL PROTECTED] >Sent: 28 February 2003 12:33 >To: [EMAIL PROTECTED] >Subject: left outer join > > >Could someone please tell me what I'm doing wrong h

Re: left outer join

2003-02-28 Thread Diana Soares
.document_field_id > WHERE DFL.document_id = 37 > AND DF.is_generic = 1 > > Basically what I want to achieve is this. I want to select all the document > fields that are > generic and IF the document has values for those fields I want to see those > to, otherwise > I want to

left outer join

2003-02-28 Thread Rob
ent fields that are generic and IF the document has values for those fields I want to see those to, otherwise I want to see null values? I thought a left outer join worked as follows: Select all items on the left table (document_fields) and join them to all items on the right table (document_fields

Simple left outer join not working for me :(

2003-02-13 Thread dan carter
Probably a simple error here, been a few years since i last did SQL work... I've got 2 tables (actually just one aliased nevermind just typing this much allowed me to figure it out :) Love the way you can spend a whole day trying to figure something out, and then as soon as you try to explain

outer join syntax

2003-01-13 Thread Admin
I would like to return rows, with specific columns, for each individual in my NAMES table, with address and e-mail if these exist. Thought I had the syntax down but I'm getting NULL results where I know there is data. I'm used to using SQL Server shortcut * for outer joins, guess that's catching

outer join

2002-10-24 Thread Lewis Smith
UAMemberOfGroup ON UAGroup.groupid = UAMemberOfGroup.groupid RIGHT OUTER JOIN Member ON UAMemberOfGroup.memberid = Member.memberid WHERE Member.mpassword IS NOT NULL AND Member.musername IS NOT NULL The idea is to bring back all members and any groups they happen to belong to. In MS SQL the query brings back

Re: RES: Aggregate + left outer join (Solution)

2002-08-15 Thread mmanickalal
Hi Eduardo, I found the solution the left outer join + aggregate problem I had earlier faced. the query should be SELECT p.nm_project, sum( dl.hours) FROM PROJECT p LEFT OUTER JOIN DAYLOG dl ON (p.id_project = dl.id_project

Re: help with syntax of left outer join

2002-08-13 Thread peter . brawley
Desmond Lee wrote: > Hi there > > I want to do a left outer join but i also have a bunch of where conditions > in my sql statment that i need. Can anyone help me out: > > SELECT title, authorName, journalName, journalPages, aname, tname, > avg(ranking) > FROM p

  1   2   >