Join Statement

2009-12-14 Thread Victor Subervi
) 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

Re: Join Statement

2009-12-14 Thread Peter Brawley
| ++--+---++ | 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

Re: Join Statement

2009-12-14 Thread Victor Subervi
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,

Re: Join Statement

2009-12-14 Thread Shawn Green
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?

RE: Join Statement

2009-12-14 Thread Steven Staples
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

Re: Join Statement

2009-12-14 Thread Mark Goodge
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;

Re: Join Statement

2009-12-14 Thread Peter Brawley
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

Re: Join Statement

2009-12-14 Thread Victor Subervi
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

RE: Can a JOIN statement do this?

2009-01-01 Thread Martin Gainty
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

Can a JOIN statement do this?

2008-12-31 Thread mikesz
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

Unable to reference right join table in left join statement under windows...but works under linux

2005-12-19 Thread Ryan Allbaugh
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

Re: Unable to reference right join table in left join statement under windows...but works under linux

2005-12-19 Thread SGreen
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

sql join statement that I do not understand

2004-06-28 Thread Joseph Norris
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

Re: sql join statement that I do not understand

2004-06-28 Thread SGreen
: Fax to: 06/28/2004 12:32 Subject: sql join statement that I do not understand PM

Re: sql join statement that I do not understand

2004-06-28 Thread Garth Webb
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

JOIN Statement on 2 Database Tables?

2003-09-17 Thread Keith Hamilton
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]

Re: JOIN Statement on 2 Database Tables?

2003-09-17 Thread Chris Boget
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

RE: JOIN Statement on 2 Database Tables?

2003-09-17 Thread Keith Hamilton
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

RE: Join Statement

2003-04-03 Thread Chris Blake
, 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

RE: Join Statement

2003-04-02 Thread Michael Shulman
-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

Join Statement

2003-03-28 Thread Chris Blake
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

merging multiple rows results in join statement

2002-11-07 Thread mysql
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

Re: merging multiple rows results in join statement

2002-11-07 Thread Michael T. Babcock
[EMAIL PROTECTED] wrote: This is what I want: +--+--+ | ticketID | pipelineName | +--+--+ | 163 | IT, Adv.Tech, RD| | 164 | IT, RD | | 165 | Video, Multimedia| | ...