Victor,
As far as I can see... change the '-' to '='.
<-- fixed query -->
SELECT
SKU
, Quantity
, Name
, Price
, p.sizes
, p.colorsShadesNumbersShort
FROM
tem126080739853 t JOIN products p ON
t.ProdID = p.ID
;
<-- end -->
I didn't run this, or try to replicate it, it was just my observation on the
query.
Steven Staples
-----Original Message-----
From: Victor Subervi [mailto:[email protected]]
Sent: December 14, 2009 11:26 AM
To: [email protected]
Subject: Join Statement
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
No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 9.0.716 / Virus Database: 270.14.101/2555 - Release Date: 12/14/09
02:37:00
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[email protected]