Help with MySQL Query (2 Outer joins)

2008-01-23 Thread Raghuveer Rawat
Hi, I need some urgent for sql query.. It will be great if someone could help me.. I have ARTICLE, FAVORITE_ARTICLES, RATING Tables apart from other table USER, CHANNEL, CATEGORY etc ARTICLE table stores a user's article, FAVORITE_ARTICLES will store a user's favorite articles, and rating table

RE : Re: RE : Re: Left outer joins, where clause and table_names

2007-10-24 Thread tom wang
--- [EMAIL PROTECTED] a écrit : > tom wang wrote: > > Hi, > > > > > > First, sorry, I kind of messed of with copy and > > pasting (it's been a long day) and forgot to strip > all > > the useless part (for the sake of explaining my > > problem) between select and from... > > > > SELECT * FROM

Re: RE : Re: Left outer joins, where clause and table_names

2007-10-24 Thread mysql
tom wang wrote: Hi, First, sorry, I kind of messed of with copy and pasting (it's been a long day) and forgot to strip all the useless part (for the sake of explaining my problem) between select and from... SELECT * FROM projects LEFT OUTER JOIN forums ON forums.work_id = projects.id AND fo

RE : Re: Left outer joins, where clause and table_names

2007-10-24 Thread tom wang
Hi, First, sorry, I kind of messed of with copy and pasting (it's been a long day) and forgot to strip all the useless part (for the sake of explaining my problem) between select and from... SELECT * FROM projects LEFT OUTER JOIN forums ON forums.work_id = projects.id AND forums.work_type = 'P

OT: "K.I.S.S."? Re: Left outer joins, where clause and table_names

2007-10-24 Thread Ralf Hüsing
tom wang schrieb: Hi, I have the following sql request: SELECT projects.`id` AS t0_r0, projects.`name` AS [..endless sql..] Hi Tom, did you understand that query (in lets say 3 months) if you need to fix a bug? If not it maybe better to simplify that. regards -ralf -- MySQL General Mai

Re: Left outer joins, where clause and table_names

2007-10-24 Thread mysql
tom wang wrote: Hi, I have the following sql request: [snipped, for the sake of the children] As you can see I have two left outerjoins involving the readerships table: LEFT OUTER JOIN readerships ON readerships.topic_id = topics.id and LEFT OUTER JOIN readerships readerships_topics ON rea

Left outer joins, where clause and table_names

2007-10-24 Thread tom wang
Hi, I have the following sql request: SELECT projects.`id` AS t0_r0, projects.`name` AS t0_r1, projects.`abbreviated_name` AS t0_r2, projects.`producer` AS t0_r3, projects.`tel_1` AS t0_r4, projects.`tel_2` AS t0_r5, projects.`recital` AS t0_r6, projects.`completed_flag` AS t0_r7, projects.`compl

Re: inner outer joins

2006-08-10 Thread Chris
Brian E Boothe wrote: hi all Can someone provide a small project using inner and outter joins with querys thanks alot create table t1 (id int); create table t2 (id int); This will find everything that has an entry in both tables: select * from t1 inner join t2; This will find records that are

inner outer joins

2006-08-09 Thread Brian E Boothe
hi all Can someone provide a small project using inner and outter joins with querys thanks alot -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: Zero Count records under left outer joins

2004-11-16 Thread Michael Stassen
Brent B. Powers wrote: I've created and populated two simple tables: create table a (id serial, d integer) insert a (d) values (1) insert a (d) values (2) insert a (d) values (3) insert a (d) values (4) create table a (id serial, a integer) insert b (a) values (1) insert b (a) values (1) insert b (

Zero Count records under left outer joins

2004-11-16 Thread Brent B. Powers
I've created and populated two simple tables: create table a (id serial, d integer) insert a (d) values (1) insert a (d) values (2) insert a (d) values (3) insert a (d) values (4) create table a (id serial, a integer) insert b (a) values (1) insert b (a) values (1) insert b (a) values (4) insert b

Re: Multiple Outer Joins

2003-12-16 Thread Peter Brawley
; how many H1 extensions, >with and without premium processing, etc. My report writer says (and I >believe her because I don't know any better) that she must perform >multiple outer self joins on the line_item table in order to create this >report. She also says that while one c

Multiple Outer Joins

2003-12-16 Thread Randy Chrismon
_item table in order to create this report. She also says that while one can do a single outer join with MySQL, one cannot do multiple outer joins. Unfortunately, I don't know enough SQL, or MySQL, to argue the point with her. I do know enough about RDBMS design, however, to object strongly

Re: MySQL Rookie having trouble with query containing several outer joins

2003-08-29 Thread Roger Baklund
* [EMAIL PROTECTED] > I'm new to MySQL and have tried many attempts myself and looked > all over for > this answer to no avail. How do I write MySQL joins to accomodate the > Oracle equivalent listed belowany help would be appreciated. > > From > iteration, > story, > person tracker,

MySQL Bug: Outer Joins producing incorrect result on a single join referencing multiple tables

2002-09-20 Thread Jean-Pierre Pelletier
he temporary table in an outer join >Submitter-Id: Jean-Pierre Pelletier >Originator:root >Organization: Peregrine Systems, Inc. >MySQL support: [none | licence | email support | extended email support ] >Synopsis: MySQL Bug: Outer Joins producing incorrect result on a single

Re: outer joins

2002-03-22 Thread Bob Hall
On Fri, Mar 22, 2002 at 04:37:07PM +, ds wrote: > Hi, did you get any answer ? > I'm having the same problem. > > If i wanted all results from table1, even if they don't appear in table2 > i would do like: > > SELECT . FROM table1 LEFT JOIN table2 ON (table1.id=table2.id) ... > > But h

Re: outer joins

2002-03-22 Thread ds
Hi, did you get any answer ? I'm having the same problem. If i wanted all results from table1, even if they don't appear in table2 i would do like: SELECT . FROM table1 LEFT JOIN table2 ON (table1.id=table2.id) ... But how to join SELECT . FROM table1 LEFT JOIN table2 ON (table1.id=t

Re: outer joins: tried some sql code myself but doesn't work - should be easy i think ?

2002-03-21 Thread Jon Barker
>I came up with the following sql statement, but I still don't see any >records that are missing in table active_monitors, I assume i am abusing the >'join syntax' but I don't know how to fix it: > >select D.monitor, D.endpoint ,A.monitor >from endpoints_defined_monitors D >left outer join active

outer joins: tried some sql code myself but doesn't work - should be easy i think ?

2002-03-21 Thread Van Overbeke, Tom
Hi, I sent a message to the list earlier today about a problem with an outer join. I tried some stuff myself and checked the archives, but no message described my syntax problem with mysql, so I turn to the list again for some helpful soul to help me: I have two tables that i want to link via an

outer joins

2002-03-20 Thread Van Overbeke, Tom
Hi, I have two tables that i want to link via an outer join: mysql> desc active_monitors; ++--+--+-+-+---+ | Field | Type | Null | Key | Default | Extra | ++--+--+-+-+---+ | monitor_id | int(

Re: double outer joins in mysql?

2002-02-19 Thread Tod Harter
On Tuesday 19 February 2002 00:48, Todd Goldenbaum wrote: > hi, > > I'm wondering if anyone knows if it's possible to do a double-outer join in > mysql. by that I mean outer-joining on two tables instead of one (both > from the same original table). in other words, whereas a normal outer join >

double outer joins in mysql?

2002-02-18 Thread Todd Goldenbaum
hi, I'm wondering if anyone knows if it's possible to do a double-outer join in mysql. by that I mean outer-joining on two tables instead of one (both from the same original table). in other words, whereas a normal outer join might go something like this: select b.date, u.name from billing b

Re: Do outer joins not work in MySQL?

2001-03-21 Thread Benjamin Pflugmann
Hi. On Mon, Mar 19, 2001 at 02:40:43PM -0500, [EMAIL PROTECTED] wrote: > Hi all, > > I'm new to MySQL and am puzzled by a curious problem. This join syntax has > always worked fine for me on SQLServer but it seems to work like an inner > join on MySQL: > > SELECT d.doccat_ID, d.doccatname > FRO

Do outer joins not work in MySQL?

2001-03-19 Thread Eric Wright
Hi all, I'm new to MySQL and am puzzled by a curious problem. This join syntax has always worked fine for me on SQLServer but it seems to work like an inner join on MySQL: SELECT d.doccat_ID, d.doccatname FROM doccats d LEFT OUTER JOIN doccat_group dg ON d.doccat_ID = dg.doccat_ID WHERE dg.group

Re: comic strip SQL question: slow queries on left outer joins

2001-01-11 Thread Tomi Junnila
* Soren Ragsdale <[EMAIL PROTECTED]> wrote on 11.01.01 11:30: > SELECT comics.tagline,votes.score FROM comics,users LEFT OUTER JOIN > votes ON comics._rowid=votes.comic AND votes.voter=30 WHERE > users._rowid=comics.author; I would try the simpler inner join to get the result you want: SELECT co

comic strip SQL question: slow queries on left outer joins

2001-01-11 Thread Soren Ragsdale
Well, I run an online comic strip at http://www.monkeydyne.com/rmcs/ I've done so for three years now, and this is the first time I've been stumped enough to ask the mysql list for help. On the site, users can submit their own comics and they can vote on other people's comics. When a particular