)
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
|
++--+---++
| 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
On Mon, Dec 14, 2009 at 12:37 PM, Peter Brawley peter.braw...@earthlink.net
wrote:
... on t.ProdID-p.ID;
Your join clause subtracts the two IDs, so it's on IDs that differ, and
apparently there aren't any.
I beg to differ:
mysql select SKU, Quantity, Name, Price, p.sizes,
Victor Subervi wrote:
On Mon, Dec 14, 2009 at 12:37 PM, Peter Brawley peter.braw...@earthlink.net
wrote:
... on t.ProdID-p.ID;
Your join clause subtracts the two IDs, so it's on IDs that differ, and
apparently there aren't any.
I beg to differ:
...
So why does my select join fail?
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:victorsube...@gmail.com]
Sent: December 14, 2009 11:26 AM
To: mysql@lists.mysql.com
Subject: Join Statement
Hi;
I have the following:
mysql
Victor Subervi wrote:
On Mon, Dec 14, 2009 a
mysql select SKU, Quantity, Name, Price, t.sizes,
t.colorsShadesNumbersShort from tem126080739853 t join products p on
t.ProdID-p.ID http://t.prodid-p.id/;
Empty set (0.00 sec)
mysql select ID, SKU, Name, Price from products;
Victor,
I beg to differ:
mysql select SKU, Quantity, Name, Price, p.sizes,
p.colorsShadesNumbersShort from tem126080739853 t join products p on
t.ProdID-p.ID http://t.prodid-p.id/;
...on t.ProdID-p.ID... _subtracts_ the two IDs. To match them use '='
rather than '-'.
PB
-
Victor
On Mon, Dec 14, 2009 at 1:04 PM, Peter Brawley
peter.braw...@earthlink.netwrote:
...on t.ProdID-p.ID... _subtracts_ the two IDs. To match them use '='
rather than '-'.
Thank you for all of you that caught that.
V
content contained within this transmission.
Date: Thu, 1 Jan 2009 11:28:51 +0800
From: mik...@qualityadvantages.com
To: mysql@lists.mysql.com
Subject: Can a JOIN statement do this?
Hello mysql and Happy New Year,
I am working with a Forum database. It contains a forums table, a
posts
Hello mysql and Happy New Year,
I am working with a Forum database. It contains a forums table, a
posts table and a threads table. Some of the posts contain flash
objects that I can find using a query like this one:
SELECT `pagetext`, `postid` FROM `post` WHERE `pagetext` LIKE
I am using MySQL 5.0.15 on windows and cannot run this query:
SELECT a.*,b.name, c.fullname,d.fullname
FROM access_authorization a, building b
LEFT JOIN users c ON a.createdby=c.id
LEFT JOIN users d ON a.modifiedby=d.id
WHERE a.sortcode=b.sortcode AND
a.sortcode like '1,2,1,6%' LIMIT 0, 25
I
Ryan Allbaugh [EMAIL PROTECTED] wrote on 12/19/2005 04:41:39 PM:
I am using MySQL 5.0.15 on windows and cannot run this query:
SELECT a.*,b.name, c.fullname,d.fullname
FROM access_authorization a, building b
LEFT JOIN users c ON a.createdby=c.id
LEFT JOIN users d ON a.modifiedby=d.id
that the join statement was supposed
to be more efficient.
I did some dinking with the joins and I go this:
It appears that optimization of joins depends upon what table you are
joining to what:
This is the new sql:
mysql select
- cs_fld_cs_tbl_l.cs_type,field_name,name,type,type_sql,rl_table
:
Fax to:
06/28/2004 12:32 Subject: sql join statement that I do
not understand
PM
rows in set (4.44 sec)
Notice the time difference? I thought that the join statement was supposed
to be more efficient.
I did some dinking with the joins and I go this:
It appears that optimization of joins depends upon what table you are
joining to what:
This is the new sql
Is it possible to Join 2 tables in 2 different databases? Can someone give
a quick example?
-- Keith
Keith Hamilton
Information Technology
[847] 451-0451 x121
[EMAIL PROTECTED]
Is it possible to Join 2 tables in 2 different databases? Can someone
give a quick example?
select database1.table1.* from
database1.table1, database2.table2 where
database1.table1.common_field = database2.table2.common_field.
Chris
-mysql,query,blah
--
MySQL General Mailing List
For list
Figged it would be easy enuf. Thanks
-- Keith
-Original Message-
From: Chris Boget [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 17, 2003 9:38 AM
To: Keith Hamilton; MySQL
Subject: Re: JOIN Statement on 2 Database Tables?
Is it possible to Join 2 tables in 2 different
, 2003 1:37 AM
To: [EMAIL PROTECTED]
Subject: Join Statement
Greetings MySQL folk,
New to MySQL.here goes.
Have db with following tables :
Client :
ClientID | ClientName | Address | Distance | ContactName | ContactNo
Jobs :
JobID | ClientID | JobDate | JobDistance | JobWorkDone
-Original Message-
From: Chris Blake [mailto:[EMAIL PROTECTED]
Sent: Friday, March 28, 2003 1:37 AM
To: [EMAIL PROTECTED]
Subject: Join Statement
Greetings MySQL folk,
New to MySQL.here goes.
Have db with following tables :
Client :
ClientID | ClientName | Address | Distance | ContactName
to create a JOIN statement in MySQL that will update the db but I
can`t get it right :
Heres the (partial) code, it`s been through so many amendments I`ve
actually got myself in a knot here.
//Create SQL to Update Job Info
$sqlSaveJob = INSERT INTO Jobs INNER JOIN
My last post wasn't titled accurately. Sorry for the repost.
I have 3 tables. Ticket Pipeline_Dept, and Ticket_Matrix. Ticket_Matrix
matches tickets to pipeline depts. A ticket can be posted to multiple pipeline
depts. I want to select all tickets and the pipeline departments they are
posted
[EMAIL PROTECTED] wrote:
This is what I want:
+--+--+
| ticketID | pipelineName |
+--+--+
| 163 | IT, Adv.Tech, RD|
| 164 | IT, RD |
| 165 | Video, Multimedia|
| ...
23 matches
Mail list logo