RE: Left join query

2009-06-01 Thread Gavin Towey
A LEFT OUTER JOIN in that query in not necessary. An inner join should be used. -Original Message- From: Shiv [mailto:shiv...@gmail.com] Sent: Saturday, May 30, 2009 10:18 PM To: bharani kumar Cc: mysql Subject: Re: Left join query Hi, Along with tables, you should also provide

Re: Left join query

2009-05-30 Thread Shiv
Hi, Along with tables, you should also provide details on how they are related. Assuming "Code" is unique in both tables and left joined on Airport table, you can do something like this SELECT A.Code, C.Code, A.SlNo, C.SlNo, A.Name, C.Location, A.status, C.status, C.type FROM Airport A LEFT OU

Left join query

2009-05-29 Thread bharani kumar
Airport table SlNoName Code AuthLocation status 1 ChennaiCHN Yes India 1 2. Hydarabed HYD Yes India 0 3 walkerWAK Yes uk1 common table SlNoName Code

Re: Problems with Left Join query

2004-09-17 Thread Michael Stassen
'module3'. The rows in permissions would be: ID | USER | MODULE | ADD | MOD | DEL 1 | bob | module1| 1 | 0 | 1 2 | bob | module2| 1 | 0 | 0 But, I need to build an entry form that lists all of the modules in the modules table and loads in the permissions fo

Re: Problems with Left Join query

2004-09-17 Thread Rhino
- Original Message - From: "David T." <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, September 17, 2004 2:33 PM Subject: Problems with Left Join query > I am building a database with permissions for different modules. The > permissions table cont

Re: Problems with Left Join query

2004-09-17 Thread Greg Donald
On Fri, 17 Sep 2004 11:33:04 -0700 (PDT), David T. <[EMAIL PROTECTED]> wrote: > I am building a database with permissions for different modules. The > permissions table contains a separate row for each module/user combination, You didn't say, but if you're using PHP you might find this of use: h

Problems with Left Join query

2004-09-17 Thread David T.
entry form that lists all of the modules in the modules table and loads in the permissions for that user. I was believing that I could write a single LEFT JOIN query that would give me all the modules and permissions in one single pass. However, when I build the query, it only returns

Re: Need help with my LEFT JOIN query...

2004-07-12 Thread SGreen
Fax to: 07/10/2004 08:18 Subject: Need help with my LEFT JOIN query...

Re: Need help with my LEFT JOIN query...

2004-07-11 Thread Martin Gainty
: "Jeff Gannaway" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, July 10, 2004 5:18 PM Subject: Need help with my LEFT JOIN query... > I'm trying to SELECT a field (ProductID) from 'Table a' WHERE two > corresponding fields are equal (a.PUBLISHER =

Need help with my LEFT JOIN query...

2004-07-10 Thread Jeff Gannaway
I'm trying to SELECT a field (ProductID) from 'Table a' WHERE two corresponding fields are equal (a.PUBLISHER = b.Vendor AND a.NUMBER = b.VIN) Table 'a' (approximately 100,000 records): ++ | ImportLiebermansStep3Add | ++ | Prod

Re: optimizing left join query

2003-02-11 Thread Saqib . N . Ali
| | Subject: Re: optimizing left join query | >| Your user_info table is not in

Re: optimizing left join query

2003-02-11 Thread Diana Soares
Your user_info table is not indexed... (user_info.uid should have an index) Check the manual: http://www.mysql.com/doc/en/MySQL_indexes.html On Tue, 2003-02-11 at 16:16, [EMAIL PROTECTED] wrote: > Hello All, > > I have the following 2 tables and "LEFT join" query as fol

optimizing left join query

2003-02-11 Thread Saqib . N . Ali
Hello All, I have the following 2 tables and "LEFT join" query as follows: mysql> describe user_lic; +++--+-+-+---+ | Field | Type | Null | Key | Default | Extra | +++--+-+-+---+

Re: MySQL Left Join Query

2002-11-20 Thread Thomas Spahni
On Tue, 19 Nov 2002, Bill Easton wrote: > I'd be happy to write up a short example for inclusion in the MySQL manual, > if there were some indication from MySQL, AB, that it would be included. I guess they will; after all it would fit perfectly into the tutorial and would be most welcome to all r

Re: MySQL Left Join Query

2002-11-19 Thread Bill Easton
"John Ragan" <[EMAIL PROTECTED]> To: "Bill Easton" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Tuesday, November 19, 2002 11:19 AM Subject: Re: MySQL Left Join Query > > wow! > > that's known as "above and beyond the call of > du

Re: MySQL Left Join Query

2002-11-19 Thread John Ragan
gt; select header.*, placement.* > from header > inner join tt > on header.code = tt.code > left join placement > on tt.code = placement.code > and tt.product = placement.product; > > which also gives the desired result: > +--+--

Re: MySQL Left Join Query

2002-11-18 Thread Bill Easton
| NULL | |7 |7 | OVRLCKBDG | +--+--+---+ > From: "Mark Colvin" <[EMAIL PROTECTED]> > To: "MySQL Mailing List \(E-mail\)" <[EMAIL PROTECTED]> > Subject: MySQL Left Join Query > Date: Mon, 18 Nov 2002 08:05:51 - > &

RE: MySQL Left Join Query

2002-11-18 Thread Mark Colvin
An update to my earlier post. I'm getting a bit closer but still not there. In the following query: select decheader.code, decheader.height, decheader.width, decplacement.position, decplacement.product from decheader left join decplacement on decheader.code = decplacement.code and (decheader.code

MySQL Left Join Query

2002-11-18 Thread Mark Colvin
I have a two table query where I want to return records from the first table and if they have corresponding details in my second table I wish to return those as well. A sample sql statement I am using is as follows: select decheader.code, decheader.height, decheader.width, decplacement.position, d

MySQL Left Join Query

2002-11-18 Thread Mark Colvin
I have a two table query where I want to return records from the first table and if they have corresponding details in my second table I wish to return those as well. A sample sql statement I am using is as follows: select decheader.code, decheader.height, decheader.width, decplacement.position, d

Re: Left Join Query Too Slow

2002-06-20 Thread Francisco Reinaldo
Hola Javier, It is difficult to tell because you did not include the table structures, relationships, indices, etc. But... at a first glance we is killing you query anyways is this: > FROM > Bill b, Hour h The poor db engine is probably creating a huge temporary table with all

Re: Left Join Query Too Slow

2002-06-20 Thread Galen Wright-Watson
On Thu, 20 Jun 2002, Javier Campoamor wrote: > Hi, > > I have a problem with the next query because it's too slow (>10 seconds) and > I need to do 10 queries like this one to show a page. > > > > SELECT > h.Hour, count(c.Amount) As NumberOfCalls, sum(c.Amount) As Amount >

Left Join Query

2001-08-03 Thread Daren Cotter
This query is driving me nuts! I have two tables, affiliates, and advertisers. The advertisers table has an affiliate_id field, which matches the affiliates tables' primary key. I'm trying to write a query that will return all affiliate id's, contact names, and the # of rows in the advertisers ta