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
On Wed, Dec 12, 2012 at 8:25 AM, Shawn Green wrote: > On 12/11/2012 7:22 PM, h...@tbbs.net wrote: >> >> ... (Are all the distinct "id"s really needed? When one joins on a >> >> field with the same name in both tables, one may use 'USING', and >> only the common field, with neither NULL, shows up i

Re: Help with left outer join

2012-12-12 Thread Shawn Green
On 12/11/2012 7:22 PM, h...@tbbs.net wrote: ... (Are all the distinct "id"s really needed? When one joins on a field with the same name in both tables, one may use 'USING', and only the common field, with neither NULL, shows up in the output.) This is a perfectly acceptable naming convention t

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: 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: Left outer join combined with inner join

2004-06-01 Thread SGreen
06/01/2004 04:33 Subject: Left outer join combined with inner join

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: 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

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: 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

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

Re: help with syntax of left outer join

2002-08-13 Thread Desmond Lee
Ah Never mind, i got it. I did some stupid stuff, but figured it out. Here's the working query: SELECT title, authorName, journalName, journalPages, aname, tname, avg(ranking) FROM publications LEFT OUTER JOIN ranking ON (publications.pubID = ranking.pubID), area,

Re: help with syntax of left outer join

2002-08-13 Thread Desmond Lee
Whoops... forgot the "on" in the join stament. I change it to include the on, but still no luck. Does anyone have any idea? SELECT title, authorName, journalName, journalPages, aname, tname, avg(ranking) FROM publications LEFT OUTER JOIN

help with syntax of left outer join

2002-08-13 Thread Desmond Lee
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 publications, area, topic, pubTopicInt, LEFT OUTER

Re: RES: Aggregate + left outer join

2002-08-09 Thread mmanickalal
| | To: manu manickalal/PRTGROUP| | cc: | | Subject: RES: Aggregate + left outer join | >

Aggregate + left outer join

2002-08-09 Thread mmanickalal
number of hours booked against a project for a date. I needed to list the total hours booked against each project for any given month. My query SELECT p.id_project, p.nm_project, sum( dl.hours) FROM PROJECT p LEFT OUTER JOIN DAYLOG dl ON (p.id_project = dl.id_project) WHERE MONTH(dl.DATE) = 8 AND

Re: Left outer join

2002-07-02 Thread Victoria Reznichenko
Arul, Monday, July 01, 2002, 3:58:48 PM, you wrote: A> Can i use left outer join in MySQL. A> Like i have one condition in Oracle A> ex: A> select * from user,company where u.companyid = c.companyid (+) A> can i rephrase the query in mysql like this A> select * from us

Left outer join

2002-07-01 Thread Arul
Hi Can i use left outer join in MySQL. Like i have one condition in Oracle ex: select * from user,company where u.companyid = c.companyid (+) can i rephrase the query in mysql like this select * from user left outer join company c using (companyid) -Arul sql , query

RE: A LEFT OUTER JOIN question.

2002-06-16 Thread Peter Normann
ect: RE: A LEFT OUTER JOIN question. Hi Peter, Thanks a lot - that does the trick! Incredibly quick response :) Ian > -Original Message- > From: Peter Normann [mailto:[EMAIL PROTECTED]] > Sent: 16 June 2002 17:06 > To: 'mySQL list'; [EMAIL PROTECTED] > Subj

RE: A LEFT OUTER JOIN question.

2002-06-16 Thread mySQL list
Hi Peter, Thanks a lot - that does the trick! Incredibly quick response :) Ian > -Original Message- > From: Peter Normann [mailto:[EMAIL PROTECTED]] > Sent: 16 June 2002 17:06 > To: 'mySQL list'; [EMAIL PROTECTED] > Subject: RE: A LEFT OUTER JOIN question

RE: A LEFT OUTER JOIN question.

2002-06-16 Thread Peter Normann
Try SELECT Items.ItemID, Stuff.info FROM Items LEFT JOIN Stuff ON (Items.ItemID = Stuff.ItemID && (type=0 || type IS NULL)); Peter Normann -Original Message- From: mySQL list [mailto:[EMAIL PROTECTED]] Sent: 16. juni 2002 17:59 To: [EMAIL PROTECTED] Subject: A LEFT OU

A LEFT OUTER JOIN question.

2002-06-16 Thread mySQL list
I have two tables, 'items' and 'stuff'. Items has a primary key of itemid. and looksmlike this ItemID other fields... 1 ... 2 3 4 5 6 Stuff contains something like this: ItemID type info 1 0blah blah 2 0something 2 1... 3 1... I want a query w

LEFT OUTER JOIN where not null datetime column is null gives incorrect result.

2002-03-14 Thread Jon Barker
>Description: Left outer join on null datetime column produces incorrect result. The 2nd select below produces no rows, which is incorrect and inconsistent with the fourth select which produces 1 row. I get the same results with server version 3.23.41 - binary vers

Re: left outer join query question

2001-06-18 Thread Jonothan Farr
11:12 AM Subject: left outer join query question > Hi, I am having a small formatting problem maybe someone can help with. > > I have a query that does a left outer join, which generates a table with a > few NULL values in some columns. All okay so far. But what I need to do is > s

left outer join query question

2001-06-18 Thread Bryan Coon
Hi, I am having a small formatting problem maybe someone can help with. I have a query that does a left outer join, which generates a table with a few NULL values in some columns. All okay so far. But what I need to do is sort on this column, and I need to put NULL values at the end. Normally