Re: Joining tables, duplicating none

2005-10-10 Thread Joerg Bruehe
Hi Jonathan, all! Jonathan Mangin wrote: I have two tables with date and uid cols. in common. Table 1 has one row per date, Table 2 has a maximum of 7 rows per date. select t1.date, t1.val, t2.val from t1 right join t2 on t1.date = t2.date where t1.date between '2005-08-01' and '2005-08-14'

Re: Joining tables, duplicating none

2005-10-08 Thread Gleb Paharenko
Hello. select t1.date, t1.val, t2.val from t1 right join t2 on t1.date = t2.date where t1.date between '2005-08-01' and '2005-08-14' and t1.uid = 'me'; Maybe it is better to move a condition on t1 fields from WHERE to ON part of the query? Or I don't see any sense in using a RIGHT

Joining tables, duplicating none

2005-10-07 Thread Jonathan Mangin
I have two tables with date and uid cols. in common. Table 1 has one row per date, Table 2 has a maximum of 7 rows per date. select t1.date, t1.val, t2.val from t1 right join t2 on t1.date = t2.date where t1.date between '2005-08-01' and '2005-08-14' and t1.uid = 'me';

Re: Joining tables, duplicating none

2005-10-07 Thread SGreen
Jonathan Mangin [EMAIL PROTECTED] wrote on 10/07/2005 02:57:28 PM: I have two tables with date and uid cols. in common. Table 1 has one row per date, Table 2 has a maximum of 7 rows per date. select t1.date, t1.val, t2.val from t1 right join t2 on t1.date = t2.date where t1.date between

Re: Joining tables, duplicating none

2005-10-07 Thread Peter Brawley
Jonathan, I have two tables with date and uid cols. in common. Table 1 has one row per date, Table 2 has a maximum of 7 rows per date. select t1.date, t1.val, t2.val from t1 right join t2 on t1.date = t2.date where t1.date between '2005-08-01' and '2005-08-14' and t1.uid = 'me'; A right join

Re: Joining tables, duplicating none

2005-10-07 Thread Jonathan Mangin
- Original Message - From: [EMAIL PROTECTED] To: Jonathan Mangin [EMAIL PROTECTED] Cc: mysql@lists.mysql.com Sent: Friday, October 07, 2005 2:09 PM Subject: Re: Joining tables, duplicating none Jonathan Mangin [EMAIL PROTECTED] wrote on 10/07/2005 02:57:28 PM: I have two tables

Re: Joining tables, duplicating none

2005-10-07 Thread SGreen
Jonathan Mangin [EMAIL PROTECTED] wrote on 10/07/2005 03:47:48 PM: - Original Message - From: [EMAIL PROTECTED] To: Jonathan Mangin [EMAIL PROTECTED] Cc: mysql@lists.mysql.com Sent: Friday, October 07, 2005 2:09 PM Subject: Re: Joining tables, duplicating none Jonathan