Re: Issue With Subqueries

2011-11-10 Thread Johan De Meersman
- Original Message - > From: "Shawn Green (MySQL)" > > Simple math (set theory) suggests that all of the values of field1 on > db2.table1 contain only copies or duplicates of the field1 values in > the rows in db1.table1. Shawn, The "select count(distinct)"s show that db1.table1.field1

Re: Issue With Subqueries

2011-11-10 Thread Johan De Meersman
- Original Message - > From: "Javier Yévenez" > > If the field db1.table1.field1 has the same name that the field > db2.table1.field1, maybe you have to use an alias for each table: No, he's using a subquery, those fields cannot be referenced. -- Bier met grenadyn Is als mosterd by den

Re: Issue With Subqueries

2011-11-09 Thread Mike Seda
:* Wednesday, November 09, 2011 7:19 AM *To:* Shawn Green (MySQL) *Cc:* Mike Seda; mysql@lists.mysql.com; Rong Chen *Subject:* Re: Issue With Subqueries Hi, mysql> select count(distinct field1) from db2.table1 where field1 not in (select field1

Re: Issue With Subqueries

2011-11-09 Thread Javier Yévenez
Hi, mysql> select count(distinct field1) from db2.table1 where field1 not in >> (select field1 from db1.table1); >> ++ >> | count(distinct field1) | >> ++ >> >> If the field db1.table1.field1 has the same name that the field db2.table1.field1, may

Re: Issue With Subqueries

2011-11-09 Thread Shawn Green (MySQL)
Hi Mike, On 11/8/2011 20:46, Mike Seda wrote: All, Can anyone out there explain the result of the third statement provided below: mysql> select count(distinct field1) from db1.table1; ++ | count(distinct field1) | ++ | 1063 | +

Issue With Subqueries

2011-11-08 Thread Mike Seda
All, Can anyone out there explain the result of the third statement provided below: mysql> select count(distinct field1) from db1.table1; ++ | count(distinct field1) | ++ | 1063 | ++ 1 row in set (0.01 sec