Re: Join question

2008-10-16 Thread Gerald L. Clark
Chris W wrote: I have two tables, one is a list of users and the other is a list of events for each user. It is a one to many relationship. The event table is pretty simple just an event type and a the date and time of the event in a datetime field. I need a query that shows all events of a

Re: Join question

2008-10-16 Thread Chris W
I have no idea what I was thinking. For some reason I was thinking Distinct wouldn't work, must have been temporarily brain dead. Thanks for the wake up call. Gerald L. Clark wrote: Chris W wrote: I have two tables, one is a list of users and the other is a list of events for each user.

Re: Join question

2008-07-31 Thread Jigal van Hemert
Dear all, I have two tables,let's call then a and b: Table a: CUI1|CUI2 C001|C002 C002|C003 C003|C055 C004|C002 ... Table b: CUI|STY C001|T001 C002|T002 C003|T003 C004|T004 C005|T006 C055|T061 .. And the join table should be: T001|T002 T002|T003 T003|T061 T004|T002

Re: join question

2006-01-05 Thread James Harvard
http://dev.mysql.com/doc/refman/4.1/en/example-maximum-column-group-row.html I'd translate it to your example, but it's bed-time here in England! HTH, James Harvard At 11:42 pm + 5/1/06, Terry Spencer wrote: I have a question for clearer brains than mine. I would like to join two tables,.

Re: Join question

2004-06-03 Thread Josh Trutwin
On Thu, 3 Jun 2004 13:06:54 -0700 Chris Dietzler [EMAIL PROTECTED] wrote: Running 4.0.18 I am trying to run a query where the query gets the offer_ID of a certain customer from the offer table and displays in the results the offer_Name associated with the offer_ID. Right now the way the

Re: Join question

2004-06-03 Thread Josh Trutwin
On Thu, 3 Jun 2004 15:22:36 -0500 Josh Trutwin [EMAIL PROTECTED] wrote: Or in preferable INNER JOIN syntax which makes it easier to forget a JOIN condition: Oops - I meant harder to forget not easier to forget. Doh. SELECT c.cst_SiteID, c.cst_IDC, a.asset_ID, o.offer_ID, o.offer_Name

RE: Join question

2003-06-06 Thread Mike Hillyer
SELECT table1.id FROM table1, table2, table3 WHERE table1.cl1 = 1 AND table1.cle2=5 AND table1.cl3 IN(1,2,5,8) AND table2.cl1 = 4 AND table2.cle2 IN (10,12,81) AND table2.cl3 IN (3,7) AND table3.distance BETWEEN 1 AND 99 AND table1.id = table2.id AND table2.id = table3.id; That should do what you

Re: Join question

2003-06-06 Thread Peter Brawley
Anthony, Do you mean this (not tested)? Select table1.id from table1 INNER JOIN table2 USING (id) INNER JOIN table3 USING (id) WHERE table1.cl1 = 1 and table1.cle2=5 AND table1.cl3 IN(1,2,5,8) AND table2.cl1 = 4 and table2.cle2 IN(10,12,81) AND table2.cl3 IN(3,7) AND

Re: Join question

2003-06-06 Thread Anthony Ward
Hi, what is the difference between your way and Mike Hillyer way?? (I can see the INNER join). But thanx to both of you. Anthony -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

RE: Join question

2003-06-06 Thread Mike Hillyer
To: [EMAIL PROTECTED] Subject: Re: Join question Hi, what is the difference between your way and Mike Hillyer way?? (I can see the INNER join). But thanx to both of you. Anthony -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com

Re: Join question

2003-06-06 Thread Peter Brawley
: Anthony Ward To: [EMAIL PROTECTED] Sent: Thursday, June 05, 2003 1:53 PM Subject: Re: Join question Hi, what is the difference between your way and Mike Hillyer way?? (I can see the INNER join). But thanx to both of you. Anthony -- MySQL General Mailing List For list

Re: Join Question

2003-03-27 Thread Bruce Feist
Usually it's best to work with normalized tables, which would make this trivial. tbl_reports isn't normalized, since it has a simulated array of persons in it. Could it be split into two tables: tbl_reports, with fields: rep_id (primary key) and other report-specific information you didn't

Re: Join Question

2003-03-27 Thread alx
On Fri, 2003-03-28 at 01:39, Bruce Feist wrote: Usually it's best to work with normalized tables, which would make this trivial. tbl_reports isn't normalized, since it has a simulated array of persons in it. Could it be split into two tables: i'm interested on how to normalize a table... can

Re: Join Question

2003-03-27 Thread Bruce Feist
alx wrote: On Fri, 2003-03-28 at 01:39, Bruce Feist wrote: Usually it's best to work with normalized tables, which would make this trivial. tbl_reports isn't normalized, since it has a simulated array of persons in it. Could it be split into two tables: i'm interested on how to

Re: RE: Join-question

2002-12-06 Thread Victoria Reznichenko
the name for 'parentid'. NJ -joseph NJ -Original Message- NJ From: Victoria Reznichenko [mailto:[EMAIL PROTECTED]] NJ Sent: Thursday, December 05, 2002 9:01 AM NJ To: [EMAIL PROTECTED] NJ Subject: re: Join-question NJ Michelle, NJ Thursday, December 05, 2002, 5:46:03 PM, you wrote: MdB I

Re: Join-question

2002-12-05 Thread Roger Baklund
* Michelle de Beer I believe this question is solved by a join, but I haven't really got a hang of it. My table: -- | uid | rootid | parentid | name | -- | 1 | 0 | 0| name1| | 2 | 1 | 1

Re: Join-question

2002-12-05 Thread Ryan Fox
- Original Message - From: Michelle de Beer [EMAIL PROTECTED] I believe this question is solved by a join, but I haven't really got a hang of it. My table: -- | uid | rootid | parentid | name | -- | 1 |

Re: Join-question

2002-12-05 Thread Doug Thompson
Hi: You might find these articles from O'Reilly Network will help clear the water. http://www.onlamp.com/pub/ct/19 Doug On Thu, 5 Dec 2002 07:46:03 -0800 (PST), Michelle de Beer wrote: I believe this question is solved by a join, but I haven't really got a hang of it. My table:

re: Join-question

2002-12-05 Thread Victoria Reznichenko
Michelle, Thursday, December 05, 2002, 5:46:03 PM, you wrote: MdB I believe this question is solved by a join, but I MdB haven't really got a hang of it. MdB My table: MdB -- MdB | uid | rootid | parentid | name | MdB --

Re: JOIN-Question

2002-09-19 Thread Mikhail Entaltsev
Peter, If you would like to get such resultset namefield1 field2 field3field4 field5 field6 - test 12 5 6 9 10 test 12 5

Re: Re: JOIN-Question

2002-09-19 Thread Peter Stöcker
Hi Mikhail! The query should be released automaticly and it shoulb be something like: SELECT a.*,b.*,c.* FROM ?? WHERE b.field3=5 OR c.field6=16 I want to have all entries wich fit to the condition. But at this time I don't know weather there is a entry with name=test or test2 or not. So

Re: Re: JOIN-Question

2002-09-19 Thread Peter Stöcker
Hi CH! Thanks a lot! That's it! I thought there is no differece between ON (condition) and USING(field), but there is! Thank you very much! CU, Peter [EMAIL PROTECTED] schrieb am 19.09.02 12:02:58: Hi Peter, pls try this query. but its not tested. select t1.name, t1.f1, t1.f2,

Re: Re: JOIN-Question

2002-09-19 Thread Mikhail Entaltsev
[EMAIL PROTECTED] To: Mikhail Entaltsev [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Thursday, September 19, 2002 11:56 AM Subject: Re: Re: JOIN-Question Hi Mikhail! The query should be released automaticly and it shoulb be something like: SELECT a.*,b.*,c.* FROM ?? WHERE b.field3=5

RE: JOIN question

2002-01-04 Thread Rick Emery
How about: mysql select count(*) from usernames INNER JOIN pictures ON usernames.user=pictures.user where state = Delaware order by ask limit 25; -Original Message- From: Boex,Matthew W. [mailto:[EMAIL PROTECTED]] Sent: Friday, January 04, 2002 2:09 PM To: [EMAIL PROTECTED] Subject:

RE: JOIN question

2002-01-04 Thread Boex,Matthew W.
PROTECTED] Subject: RE: JOIN question How about: mysql select count(*) from usernames INNER JOIN pictures ON usernames.user=pictures.user where state = Delaware order by ask limit 25; -Original Message- From: Boex,Matthew W. [mailto:[EMAIL PROTECTED]] Sent: Friday, January 04, 2002 2:09 PM

RE: JOIN question

2002-01-04 Thread Gary . Every
.'; [EMAIL PROTECTED] Subject: RE: JOIN question How about: mysql select count(*) from usernames INNER JOIN pictures ON usernames.user=pictures.user where state = Delaware order by ask limit 25; -Original Message- From: Boex,Matthew W. [mailto:[EMAIL PROTECTED]] Sent: Friday, January 04

Re: Join question

2001-03-15 Thread Gerald L. Clark
Your two Title fields are not the same size. This could prevent a match. It will slow down joins in 3.22. Carl Schrader wrote: I have 2 tables with a common field of Title. Table 1 defined as: Name;varchar(60) Title;varchar(60) Year;varchar(4) Other;varchar(30) Other2;varchar(30)

Re: Join Question

2001-03-05 Thread Bob Hall
What am I doing wrong? The goal is to count the number of entries which match the account preferences. The results are correct, but the times are so far off... mysql select count(*) from STLOUIS left join ClientSTL - on STLOUIS.Dwell=ClientSTL.Dwell where ClientSTL.account='pruitt';