Re: Conditional join of tow tables

2010-09-07 Thread mysql
: mysql@lists.mysql.com Subject: Conditional join of tow tables Hi listers mysql> show global variables like "version"; +---++ | Variable_name | Value | +---++ | version | 5.1.46 | +---++ 1 row in set (0.02 sec) mysq

RE: Conditional join of tow tables

2010-09-07 Thread Travis Ard
Does this work? select * from t1 join t2 on (t1.datum = t2.sdat or dayname(t1.datum) = t2.tag); -Travis -Original Message- From: mysql [mailto:my...@ayni.com] Sent: Tuesday, September 07, 2010 1:43 AM To: mysql@lists.mysql.com Subject: Conditional join of tow tables Hi listers mysql

Conditional join of tow tables

2010-09-07 Thread mysql
Hi listers mysql> show global variables like "version"; +---++ | Variable_name | Value | +---++ | version | 5.1.46 | +---++ 1 row in set (0.02 sec) mysql> Following problem: Two tables which must be joined differently depending