List:General Discussion« Previous MessageNext Message »
From:Victor Subervi Date:December 14 2009 4:26pm
Subject:Join Statement
View as plain text  
Hi;
I have the following:

mysql> select SKU, Quantity, Name, Price, p.sizes,
p.colorsShadesNumbersShort from tem126080739853 t join products p on
t.ProdID-p.ID;
Empty set (0.00 sec)

mysql> select * from tem126080739853;
+----+--------+----------+-------------+--------------------------+
| ID | ProdID | Quantity | sizes       | colorsShadesNumbersShort |
+----+--------+----------+-------------+--------------------------+
|  1 |      2 |        2 | Extra-small | navy-blue:CC7722         |
+----+--------+----------+-------------+--------------------------+
1 row in set (0.00 sec)
mysql> select SKU, Quantity, Name, Price, p.sizes,
p.colorsShadesNumbersShort from tem126080739853 t join products p on
t.ProdID-p.ID;
Empty set (0.03 sec)

mysql> select SKU, Quantity, Name, Price, t.sizes,
t.colorsShadesNumbersShort from tem126080739853 t join products p on
t.ProdID-p.ID;
Empty set (0.00 sec)

mysql> select ID, SKU, Name, Price from products;
+----+----------+-------+--------+
| ID | SKU      | Name  | Price  |
+----+----------+-------+--------+
|  2 | prodSKU1 | name1 | 555.22 |
+----+----------+-------+--------+
1 row in set (0.00 sec)

So I'm at a loss as to why the above select join statement fails. Please
advise.
TIA,
Victor

Thread
Join StatementVictor Subervi14 Dec
  • Re: Join StatementPeter Brawley14 Dec
    • Re: Join StatementVictor Subervi14 Dec
      • Re: Join StatementShawn Green14 Dec
      • Re: Join StatementMark Goodge14 Dec
      • Re: Join StatementPeter Brawley14 Dec
        • Re: Join StatementVictor Subervi14 Dec
  • RE: Join StatementSteven Staples14 Dec