Review your join type.
From: ext Gavin Towey [gto...@ffn.com]
Sent: 16 August 2010 19:36
To: Victor Subervi; mysql@lists.mysql.com
Subject: RE: Join Problem
What do you mean by "not working?" What results do you get?
-Original Message
What do you mean by "not working?" What results do you get?
-Original Message-
From: Victor Subervi [mailto:victorsube...@gmail.com]
Sent: Monday, August 16, 2010 6:59 AM
To: mysql@lists.mysql.com
Subject: Join Problem
Hi;
I have this code:
select f.id from Flights f joi
Hi;
I have this code:
select f.id from Flights f join Planes p where f.plane_id=p.id and
p.in_service=1
mysql> describe Flights;
+-+---+--+-+-++
| Field | Type | Null | Key | Default | Extra |
+-+-
Thanks
V
On Fri, Oct 2, 2009 at 11:08 AM, Mark Goodge wrote:
> Victor Subervi wrote:
>
>> Hi;
>> I get the following error:
>>
>> *SQL query:*
>>
>> SELECT ID, Item
>> FROM products
>> JOIN categories ON categories.ID = products.Category
>> LIMIT 0 , 30;
>>
>> *MySQL said:*
>> #1052 - Column '
Victor Subervi wrote:
Hi;
I get the following error:
*SQL query:*
SELECT ID, Item
FROM products
JOIN categories ON categories.ID = products.Category
LIMIT 0 , 30;
*MySQL said:*
#1052 - Column 'ID' in field list is ambiguous
Please note the error is about ambiguity. "products" has an ID fiel
Victor Subervi wrote:
Hi;
I get the following error:
*SQL query:*
SELECT ID, Item
FROM products
JOIN categories ON categories.ID = products.Category
LIMIT 0 , 30;
*MySQL said:*
#1052 - Column 'ID' in field list is ambiguous
Please note the error is about ambiguity. "products" has an ID fiel
Qualify the column names. EG
SELECT categories.ID, products.Item
FROM products
JOIN categories ON categories.ID = products.Category
LIMIT 0 , 30;
Regards
John Daisley
> Hi;
> I get the following error:
>
> *SQL query:*
>
> SELECT ID, Item
> FROM products
> JOIN categories ON categories.ID =
On Fri, Oct 2, 2009 at 10:53 AM, Victor Subervi wrote:
> Hi;
> I get the following error:
>
> *SQL query:*
>
> SELECT ID, Item
> FROM products
> JOIN categories ON categories.ID = products.Category
> LIMIT 0 , 30;
>
> *MySQL said:*
> #1052 - Column 'ID' in field list is ambiguous
>
> Please note
Hi;
I get the following error:
*SQL query:*
SELECT ID, Item
FROM products
JOIN categories ON categories.ID = products.Category
LIMIT 0 , 30;
*MySQL said:*
#1052 - Column 'ID' in field list is ambiguous
Please note the error is about ambiguity. "products" has an ID field and so
does "categorie
Thanks. That worked.
Jason Trebilcock wrote:
Methinx you need a "GROUP BY" in there. See below.
-Original Message-
From: John Meyer [mailto:john.l.me...@gmail.com]
Sent: Thursday, September 10, 2009 6:48 PM
To: mysql@lists.mysql.com
Subject: Natural join problem
Methinx you need a "GROUP BY" in there. See below.
> -Original Message-
> From: John Meyer [mailto:john.l.me...@gmail.com]
> Sent: Thursday, September 10, 2009 6:48 PM
> To: mysql@lists.mysql.com
> Subject: Natural join problem
>
> Two tables:
>
Two tables:
USERS:
USER_ID (PK)
. . .etc
TWEETS:
TWEET_ID (PK)
USER_ID (FK)
Trying to get the user information and the number of tweets each person has:
SELECT USERS.USER_NAME, COUNT(TWEETS.TWEET_ID) AS 'TWEETCOUNT' FROM
TWEETS NATURAL JOIN USERS;
But it seems to be just rolling up all the
ington Ave.
Farmington, CT 06032
860.674.8796 / FAX: 860.674.8341
www.the-infoshop.com
www.giiexpress.com
www.etudes-marche.com
>-Original Message-
>From: Jerry Schwartz [mailto:[EMAIL PROTECTED]
>Sent: Monday, April 14, 2008 11:26 AM
>To: 'Mysql'
>Subject:
I've found yet another oddity with this situation. If I leave the date test
off of both JOINs they give the same number of rows, but they give me the
wrong number! Neither one of them gives me 860 rows returned. I must not
understand how a LEFT JOIN works.
By the way, the EXPLAIN for both of my or
>From: Bill Newton [mailto:[EMAIL PROTECTED]
>Sent: Monday, April 14, 2008 2:09 PM
>To: Jerry Schwartz
>Cc: 'Mysql'
>Subject: Re: LEFT JOIN problem
>
>Hi Jerry,
>
>I think the problem is that NULL is not less than or greater than your
>prod_published date.
Hi Jerry,
I think the problem is that NULL is not less than or greater than your
prod_published date. So you probably have eo_pub_date set to NULL in 56
of your rows.
so for
eo_name_table.eo_pub_date > prod.prod_published
or
eo_name_table.eo_pub_date <= prod.prod_published
mysql will rer
I have a table, eo_name_table, that has exactly 860 unique titles in it.
Each record also has a date field, eo_pub_date:
+-+--+--+-+-+---+
| Field | Type | Null | Key | Default | Extra |
+-+--+--+-+-+
Yes, that is the correct behavior of a LEFT JOIN. A left join keeps
all the record from the original/left table and will link up any
related data from the right table, but if there is no related data,
it sets it to NULL. If you want the join to act as a filter, the just
use regular JOIN.
I am attempting to left join several tables. This was working at one time
but has seemed to stop just recently. I have checked and installed the
lastest version of mysql via Debian Etch apt-get. I am running version
5.0.32.
I have simplified the example down to just 3 tables but the problem exi
Hi,
> two tables gi_t and gi
>
> gi_t holds 5 records. gi holds ca. 1500.
>
> I need all from gi for each in gi_t ie LEFT JOIN!!!
> but this:
> SELECT gi.id AS id, overskrift,gidata FROM gi_t LEFT JOIN gi ON
> gi_t.id=gi.gitref WHERE bladref=137
> gives the same as
> SELECT gi.id AS id, oversk
hermer Didriksen [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, September 05, 2007 10:39 AM
> To: mysql@lists.mysql.com
> Subject: Left join problem
>
> Hi
> two tables gi_t and gi
>
> gi_t holds 5 records. gi holds ca. 1500.
>
> I need all from gi for each in gi_t ie LEFT JOIN
Hi
two tables gi_t and gi
gi_t holds 5 records. gi holds ca. 1500.
I need all from gi for each in gi_t ie LEFT JOIN!!!
but this:
SELECT gi.id AS id, overskrift,gidata FROM gi_t LEFT JOIN gi ON
gi_t.id=gi.gitref WHERE bladref=137
gives the same as
SELECT gi.id AS id, overskrift,gidata FROM gi_
On 2006-07-21 1:01 PM, "Gerald L. Clark" <[EMAIL PROTECTED]>
wrote:
> It is a join precedence issue. Use INNER Join instead of a comma.
Thanks Gerald.
Paul DuBois' polite suggestion to read the manual helped. Upon re-reading
the section about the change in precedence with
the comma operator
Stephen P. Fracek, Jr. wrote:
I'm trying to upgrade from MySQL 4.1 to MySQL 5.0.
A query that works in MySQL 4.1 does not work in MySQL 5.0 and I'm at a loss
as to how to proceed.
SELECT tab_a.item1, tab_b.item2, tab_c.item3, tab_d.item4, tab_e.item5,
tab_f.item6 FROM db.tab_a, db.tab_e, db.tab
At 12:47 PM -0500 7/21/06, Stephen P. Fracek, Jr. wrote:
I'm trying to upgrade from MySQL 4.1 to MySQL 5.0.
A query that works in MySQL 4.1 does not work in MySQL 5.0 and I'm at a loss
as to how to proceed.
SELECT tab_a.item1, tab_b.item2, tab_c.item3, tab_d.item4, tab_e.item5,
tab_f.item6 FROM
I'm trying to upgrade from MySQL 4.1 to MySQL 5.0.
A query that works in MySQL 4.1 does not work in MySQL 5.0 and I'm at a loss
as to how to proceed.
SELECT tab_a.item1, tab_b.item2, tab_c.item3, tab_d.item4, tab_e.item5,
tab_f.item6 FROM db.tab_a, db.tab_e, db.tab_f LEFT JOIN db.tab_b ON tab_b.i
: "Guy Brom" <[EMAIL PROTECTED]>
To:
Sent: Saturday, November 05, 2005 10:28 AM
Subject: LEFT JOIN problem
> I have the following tables:
>
> languages
> language_id int,
> language_title varchar(80)
>
> objects
> object_id int
> object_language_id int
2005/11/5, Guy Brom <[EMAIL PROTECTED]>:
> I have the following tables:
>
> languages
> language_id int,
> language_title varchar(80)
>
> objects
> object_id int
> object_language_id int
> object_title varchar(100)
>
> I want to select ALL available languages, and match the translated object
>
I have the following tables:
languages
language_id int,
language_title varchar(80)
objects
object_id int
object_language_id int
object_title varchar(100)
I want to select ALL available languages, and match the translated object
(if it is exists) for a specific object_id. If it does not exists
Hi Hank,
I think your problem is to find all the files under /uploads by a command like :
cd /uploads
ls -lR | grep ".doc" >files.txt
then load the files.txt into a temporary table TEMPtable that you create for
this issue (see http://dev.mysql.com/doc/mysql/en/load-data.html), after
truncating it
Hank <[EMAIL PROTECTED]> wrote on 05/24/2005 05:02:47 PM:
> I have a table of school class assignments with the following fields -
> the first four fields are the primary key:
>
> Year (int)
> Term (enum, "Spring", "Fall","Winter")
> ClassID (int)
> SectionID (int)
> Attachement (varchar 225)
>
I have a table of school class assignments with the following fields -
the first four fields are the primary key:
Year (int)
Term (enum, "Spring", "Fall","Winter")
ClassID (int)
SectionID (int)
Attachement (varchar 225)
The "attachment" field is a pointer to a file in the OS of an uploaded
file,
On Feb 17, 2005, at 10:34 AM, [EMAIL PROTECTED] wrote:
Albert Padley <[EMAIL PROTECTED]> wrote on 02/17/2005 12:08:31 PM:
> I have the following 2 tables:
>
> CREATE TABLE `division_info` (
> `id` int(11) NOT NULL auto_increment,
> `division` varchar(50) NOT NULL default '',
> `spot
Michael Dykman <[EMAIL PROTECTED]> wrote on 02/17/2005 12:20:44 PM:
> On Thu, 2005-02-17 at 12:08, Albert Padley wrote:
> > I have the following 2 tables:
> >
> > CREATE TABLE `division_info` (
> >`id` int(11) NOT NULL auto_increment,
> >`division` varchar(50) NOT NULL default '',
> >
s only for compatibility with odbc".
> thanks!
>
> >From: Michael Dykman <[EMAIL PROTECTED]>
> >To: Albert Padley <[EMAIL PROTECTED]>
> >CC: "\"MySQL List\""
> >Subject: Re: JOIN Problem
> >Date: Thu, 17 Feb 2005 12:20
Albert Padley <[EMAIL PROTECTED]> wrote on 02/17/2005 12:08:31 PM:
> I have the following 2 tables:
>
> CREATE TABLE `division_info` (
>`id` int(11) NOT NULL auto_increment,
>`division` varchar(50) NOT NULL default '',
>`spots` int(11) NOT NULL default '0',
>PRIMARY KEY (`id`),
>
CTED]>
CC: "\"MySQL List\""
Subject: Re: JOIN Problem
Date: Thu, 17 Feb 2005 12:20:44 -0500
On Thu, 2005-02-17 at 12:08, Albert Padley wrote:
> I have the following 2 tables:
>
> CREATE TABLE `division_info` (
>`id` int(11) NOT NULL auto_increment,
>`divis
On Thu, 2005-02-17 at 12:08, Albert Padley wrote:
> I have the following 2 tables:
>
> CREATE TABLE `division_info` (
>`id` int(11) NOT NULL auto_increment,
>`division` varchar(50) NOT NULL default '',
>`spots` int(11) NOT NULL default '0',
>PRIMARY KEY (`id`),
>KEY `division`
I have the following 2 tables:
CREATE TABLE `division_info` (
`id` int(11) NOT NULL auto_increment,
`division` varchar(50) NOT NULL default '',
`spots` int(11) NOT NULL default '0',
PRIMARY KEY (`id`),
KEY `division` (`division`),
KEY `spots` (`spots`)
) TYPE=MyISAM
CREATE TABLE `team_
olubchik [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, November 23, 2004 2:13 PM
> To: Dilipan Sebastiampillai
> Cc: [EMAIL PROTECTED]
> Subject: Re: 4.0.18 -> 4.1.7 LEFT JOIN problem
>
> Hi!
>
> On Nov 23, Dilipan Sebastiampillai wrote:
> > >
> > >
> &
Hi!
On Nov 23, Dilipan Sebastiampillai wrote:
> >
> >
> >Hi!
> >
> >On Nov 22, Dilipan Sebastiampillai wrote:
> >
> >
> >>I moved a db from 4.0.18 to 4.1.7 and I realise that the SAME sql query
> >>using LEFT JOIN gives me different result.
> >>The result from 4.0.18 does s real LEFT JOIN but 4.
Hi!
On Nov 22, Dilipan Sebastiampillai wrote:
I moved a db from 4.0.18 to 4.1.7 and I realise that the SAME sql query
using LEFT JOIN gives me different result.
The result from 4.0.18 does s real LEFT JOIN but 4.1.7 differs
sometimes and I don't want that.
I think it comes from an 'optimiza
Hi!
On Nov 22, Santino wrote:
> At 15:23 +0100 22-11-2004, Sergei Golubchik wrote:
> >Hi!
> >
> >On Nov 22, Dilipan Sebastiampillai wrote:
> >> I moved a db from 4.0.18 to 4.1.7 and I realise that the SAME sql query
> >> using LEFT JOIN gives me different result.
> >> The result from 4.0.18 does s
On Monday 22 November 2004 04:15 pm, Santino wrote:
I can confirm it anyway: I think we have a bug.. Unless someone else see
something, might want to take this to bugs.mysql.com
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 578 to server version: 4.1.7-log
At 15:23 +0100 22-11-2004, Sergei Golubchik wrote:
Hi!
On Nov 22, Dilipan Sebastiampillai wrote:
I moved a db from 4.0.18 to 4.1.7 and I realise that the SAME sql query
using LEFT JOIN gives me different result.
The result from 4.0.18 does s real LEFT JOIN but 4.1.7 differs
sometimes and I don
Hi!
On Nov 22, Dilipan Sebastiampillai wrote:
> I moved a db from 4.0.18 to 4.1.7 and I realise that the SAME sql query
> using LEFT JOIN gives me different result.
> The result from 4.0.18 does s real LEFT JOIN but 4.1.7 differs
> sometimes and I don't want that.
>
> I think it comes from an
I moved a db from 4.0.18 to 4.1.7 and I realise that the SAME sql query
using LEFT JOIN gives me different result.
The result from 4.0.18 does s real LEFT JOIN but 4.1.7 differs
sometimes and I don't want that.
I think it comes from an 'optimization' how can I make a query
without using t
Hello list,
im having a hughe problem with the RAND() function
first of all im using mysql 3.23 so subquerys are impossible.
Im having three tables which are joined by ID's now i want to select
a single row random out of the join set whats the best way to do it?
My Table structure is:
table1
Thanks for the suggestion, but according to explain we are in worse shape
than before. In both cases the multi-column index is ignored. I am going to
try fiddling with the index col order to see if this helps.
Here is what it comes up with as you suggested:
Query1:
explain SELECT COUNT(*) as Nu
Afternoon all. I wonder if any experts on the join optimiser could help me
out. I have read the docs, including the material on how mysql optimises
joins, and have redesigned my schema somewhat to try and simplify the joins,
and that has worked to some extent. But I am still way off the performance
* Martijn Tonies
> * me
> > Huh? What would be invalid about it?
>
> That moving parts of the WHERE clause to the JOIN clause returns
> a different result set. But as I said: I don't have the full story ... oh
> wait, I found the first message in my mailbox somewhere.
>
> I guess "OUTER" is opti
> > * Martijn Tonies
> > > * Rory McKinley
> > > > Thanks Roger
> > > >
> > > > That fixed the problem.I was under the impression that I only
had
> to
> > > > put the linked columns n the ON and everything else in the
> WHERElive
> > > > an learn I guess.
> > >
> > > Ehm, I'm not completel
> * Martijn Tonies
> > * Rory McKinley
> > > Thanks Roger
> > >
> > > That fixed the problem.I was under the impression that I only had
to
> > > put the linked columns n the ON and everything else in the
WHERElive
> > > an learn I guess.
> >
> > Ehm, I'm not completely sure, but isn't th
* Martijn Tonies
> * Rory McKinley
> > Thanks Roger
> >
> > That fixed the problem.I was under the impression that I only had to
> > put the linked columns n the ON and everything else in the WHERElive
> > an learn I guess.
>
> Ehm, I'm not completely sure, but isn't this invalid behaviour?
> Thanks Roger
>
> That fixed the problem.I was under the impression that I only had to
put
> the linked columns n the ON and everything else in the WHERElive an
> learn I guess.
Ehm, I'm not completely sure, but isn't this invalid behaviour? Can you post
the DDL and INSERT INTO data for
those who understand binary and those who don't" (Unknown)
- Original Message -
From: "Roger Baklund" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: "Rory McKinley" <[EMAIL PROTECTED]>
Sent: Thursday, November 20, 2003 4:23 PM
Subject: Re: LEF
* Rory McKinley
[...]
> SELECT a.line_number, a.category_value, IFNULL(b.parameter_trigger, 0)
> FROM DB1.Table 1 AS a LEFT JOIN DB2.Table 2 AS b ON
> a.category_name = b.parameter_value
> WHERE a.line_type = 13 AND b.parameter_ID = 13
>
> The only problem is that the query only returns the first t
Hi List
I am currently running a query that reads records from one table (Table 1) links these
records to an id value in another table (Table 2) and returns the result. The tables
are as follows, with sample data:
Table 1in DB 1:
line_number | category_name | category_value | line_type
1
Yes, you are correct. I was thinking that wouldn't be the case, but it makes sense now. I added indexes and then the query returned in a few seconds. Definitely have to have indexes.
Thanks!
Dan Nelson wrote:
In the last episode (Sep 18), Allen said:
I have two tables. One table is 13 milli
Allen wrote:
I have two tables. One table is 13 million rows the other is about
250,000. I am trying to join the two to find users. The tables are not
indexed and I know that will effect the speed, but the join never
completes. I let it run for about 10 hours and the process was stuck in
th
In the last episode (Sep 18), Allen said:
> I have two tables. One table is 13 million rows the other is about
> 250,000. I am trying to join the two to find users. The tables are not
> indexed and I know that will effect the speed, but the join never
> completes. I let it run for about 10 h
I have two tables. One table is 13 million rows the other is about 250,000. I am trying to join the two to find users. The tables are not indexed and I know that will effect the speed, but the join never completes. I let it run for about 10 hours and the process was stuck in the "sending" state
On Mon, Jun 02, 2003 at 12:48:38PM +0200, Dejan Milenkovic wrote:
> I have two tables, one is containing data about courses and the second one
> is containing data about course start date.
> Is it possible to list all courses with one query which should also return
> earliest scheduled start dates
Hi,
I have two tables, one is containing data about courses and the second one
is containing data about course start date.
Is it possible to list all courses with one query which should also return
earliest scheduled start dates for courses (which are in the second table).
I tried something like t
Friday, May 30, 2003 3:42 PM
To: [EMAIL PROTECTED]
Cc: Susan Ator
Subject: RE: Join problem
> Well, I'm running 3.23.54 on Red Hat 7.3. Given this, how in the world
> do I accomplish the following:
>
> I have these tables:
> dacspriv - with d
; -Original Message-
> From: Ryan McDougall [mailto:[EMAIL PROTECTED]
> Sent: Friday, May 30, 2003 12:11 PM
> To: mysql
> Subject: Re: Join problem
>
>
>> Short answer is mysql does not do sub-selects (i.e., a select inside
>> of a select). The join part is not th
>> Short answer is mysql does not do sub-selects (i.e., a select inside
>> of a select). The join part is not this issue.
>
> Wouldn't this depend on the version... I thought the newest versions,
> 4.x+, supported sub-selects.
>
> Ryan
>
> __
> Do you Yahoo!?
> Yahoo
Sent: Friday, May 30, 2003 12:11 PM
To: mysql
Subject: Re: Join problem
> Short answer is mysql does not do sub-selects (i.e., a select inside of a
> select). The join part is not this issue.
Wouldn't this depend on the version... I thought the newest versions, 4.x+,
supported su
> Short answer is mysql does not do sub-selects (i.e., a select inside of a
> select). The join part is not this issue.
Wouldn't this depend on the version... I thought the newest versions, 4.x+,
supported sub-selects.
Ryan
__
Do you Yahoo!?
Yahoo! Calendar - Free
> O. I've got a headache trying to understand joins. I'm definitely
> NOT a database guru.
>
> Why in the world doesn't this work?
>
>
> SELECT dacspriv_name
> FROM dacspriv
> WHERE dacspriv_id not in (SELECT dacspriv_id
> FROM dacs_access JOIN users
> ON dacs_access.user_id=users.user_id
> WHE
O. I've got a headache trying to understand joins. I'm definitely NOT a
database guru.
Why in the world doesn't this work?
SELECT dacspriv_name
FROM dacspriv
WHERE dacspriv_id not in (SELECT dacspriv_id
FROM dacs_access JOIN users
ON dacs_access.user_id=users.user_id
WHERE users.username='sa
Sorin,
>> Okay, here for another wild guess:
>> SELECT u.login, p.name, sp.name, SUM(t.time)
>> FROM t_user u
>> LEFT JOIN t_project p ON 1
>> LEFT JOIN t_subproject sp ON p.id = sp.project_id
>> LEFT JOIN t_time t ON ?? = ??
>> WHERE u.login = 'amg'
>> GROUP BY p.name
>> Where I'm not sure if you
Stefan Hinz wrote:
Okay, here for another wild guess:
SELECT u.login, p.name, sp.name, SUM(t.time)
FROM t_user u
LEFT JOIN t_project p ON 1
LEFT JOIN t_subproject sp ON p.id = sp.project_id
LEFT JOIN t_time t ON ?? = ??
WHERE u.login = 'amg'
GROUP BY p.name
Where I'm not sure if you will need t
Sorin,
> If there are entries which are:
> 60 / amg / 5
> 120 / amg / 5
> (in this example '5' is the id of the calculation-subproject)
> Then the result should be:
> +---+---+---+---+
> | login | name | name |
Hi all,
I posted my question a short time ago and didn't receive any answers. So
I am trying describe it better.
I want to select For every user (from table t_user), every project (from
t_project) and from every project I want to select every subproject
which has the id of the project (t_subpr
I hope someone can help. I have a table that has serveral records with
the same name but unique datestamps. I need to show only the records
with the latest datestamp associated with them. I am enclosing the sql
that I am working with in hopes that someone can see the problem that I
can't. I cras
Hi all. I'm having trouble this a process that just keeps running. To view
this process I'm using the msql SHOW PROCESSLIST command. Here's the
message I'm seeing:
38 | bb50 | localhost | bb50 | Query | 197 | Copying to tmp table |
select a.pk1,a.sos_id_pk2, a.name, count(q.pk1)
t;
> > > 1 4 1 4
> > >
>
>
> If that is the case, is this a Win-XP specific bug?
> Can someone running versions other than MySQL 4.0.5-beta on XP verify if
> it is a bug please?
>
> Thanks!
>
>
> Haksun
>
> > -Original Message
ecember 01, 2002 3:39 PM
> To: Haksun Li; [EMAIL PROTECTED]
> Subject: Re: mysql join problem (bug?)
>
> Hi Haksun,
> Cross-join works perfectly on 3.23.53-max-nt under Win2000 SP2, both
from
> command line and MySQL Control Center 0.8.6-alpha.
> Regards,
> =dn
>
Hi Haksun,
Cross-join works perfectly on 3.23.53-max-nt under Win2000 SP2, both from
command line and MySQL Control Center 0.8.6-alpha.
Regards,
=dn
> Hi all,
>
>
>
> I found this join problem using mysql 3.23.53-max-nt (on WinXP).
>
> It works fine on MySQL 3.23.52-log (on
Hi all,
I found this join problem using mysql 3.23.53-max-nt (on WinXP).
It works fine on MySQL 3.23.52-log (on Linux).
Could someone please confirm that it is a bug? Or enlighten me on
writing the correct sql?
I have a table and data as shown in the script below.
CREATE TABLE
I am having some problems seeing posts to the list so if anyone has already
received this mail I apologise. Anyway, 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
sta
Hi,
I've got two tables, links and categories.
links ...
id int(11) NOT NULL auto_increment,
name text,
note text,
link text,
category1 int(11) NOT NULL default '0',
category2 int(11) NOT NULL default '0',
category3 int(11) NOT NULL default '0',
date_added timestamp(14) NOT NUL
Defryn,
Monday, July 08, 2002, 5:09:51 AM, you wrote:
D> Can anyone have a look at my join.
D> It returns errors
D> Select O.name, O.amount , P.Productname, P.price
D> From Orders AS O
D> JOIN Products AS P ON O.product=P.Productid
D> Where O.cluster= 'ANP';
D> It works fine when I use
D> Sel
sql,query
Can anyone have a look at my join.
It returns errors
Select O.name, O.amount , P.Productname, P.price
>From Orders AS O
JOIN Products AS P ON O.product=P.Productid
Where O.cluster= 'ANP';
It works fine when I use
Select O.Name, O.amount, P.productname , P.price
>From Orders as O,
hello to all mysql list subscribers ,
I have a problem which I think can be solved by SELF
JOIN but I can't figure out how to do it
here is table definition
CREATE TABLE first (
firstcolumn int(11) default NULL,
secondcolumn int(11) default NULL
) TYPE=MyISAM;
INSERT INTO first VALUES (0
On Monday 01 April 2002 10:56 am, IvanLatysh wrote:
> Hi.
> I am running MySQL 3.23.44-Max
>
> I have 2 tables.
>
> Table "A"
> +---++
> IDName
> +---++
> 1 string 1
> 2 string 2
> +---++
>
> Table "B"
>
> +---++
> IDName
> +---++
> 2
Hi.
I am running MySQL 3.23.44-Max
I have 2 tables.
Table "A"
+---++
IDName
+---++
1 string 1
2 string 2
+---++
Table "B"
+---++
IDName
+---++
2 string 2
3 string 3
+---++
And I need result
+---++
ID
Hi All,
I have a curious problem with a left join:-
create table foo (a int);
insert into foo values(1);
insert into foo values(2);
create table bar1 (a int, b datetime not null);
insert into bar1 values(1, '25-12-2001');
create table bar2 (a int, b datetime);
insert into bar2 values(1, '25-
* Miretsky, Anya
> Select distinct
> biblio.* from biblio left join keyword on
> biblio.p_biblio=keyword.fk_biblio
> where keyword="SOMESTRING";
Try swapping the tables:
Select distinct
biblio.* from keyword left join biblio on
biblio.p_biblio=keyword.fk_biblio
where keyword="SOMESTRING";
The l
possibly
-Original Message-
From: Miretsky, Anya [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 15, 2002 2:32 PM
To: 'Rick Emery'
Subject: RE: Left Join problem - Please Help
When I do this without specifying a left join with just :select biblio.*
from biblio,keyword wher
he mysql list to see what the experts think.
-Original Message-
From: Miretsky, Anya [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 15, 2002 2:17 PM
To: 'Rick Emery'
Subject: RE: Left Join problem - Please Help
Biblio has 11,901 and keyword has 87,971, also I indexed the
Show us your table structure, some table values and the SELECT statement
that works and the one that doesn't
-Original Message-
From: Miretsky, Anya [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 15, 2002 12:13 PM
To: '[EMAIL PROTECTED]'
Subject: Left Join proble
Whenever I try to issue a query which has a left join for two tables and a
where clause for a column in the second table that is a varchar the query
runs indefinitely. If I change the where clause to search on a numeric type
column the query runs and returns expected values.
Does anyone know what
Dave Butler wrote:
> I am struggling with a join query using MySQL 3.23.31 under AIX 4.3.3.
> Here are the tables involved:
>
> select CAT.linenum, CAT.acct, FD.amount
> from sched_acct_cat CAT LEFT JOIN fd FD
> ON CAT.acct = FD.acct
> where CAT.sched_acct = 'INC_STMT'
> AND FD.entity='FMCI'
I am struggling with a join query using MySQL 3.23.31 under AIX 4.3.3. Here
are the tables involved:
CREATE TABLE sched_acct_cat (
sched_acct varchar(8) NOT NULL default '',
linenum int(11) unsigned NOT NULL default '0',
acct varchar(8) default NULL,
label varchar(40) default NULL,
ind
Thanks ! It's exactlly what I wanted.
I got the same result a few seconds ago using EMS MySQL Manager but I
didn't understand how. Your example is much better !
What is the difference between a LEFT JOIN and a LEFT OUTER JOIN ?
And of course you're right for the data type ;
Thanks again
A
mysql> create table users(
-> usrID smallint unsigned auto_increment,
-> usrZip char(5),
-> primary key(usrID));
Query OK, 0 rows affected (0.00 sec)
mysql> create table cities(
-> ctyZip char(5) not null,
-> ctyName varchar(30) not null,
-> primary key(ctyZip));
Query OK,
>people.zip = city.zip
>
>yo get 2 rows from people 1 and 3
>
>notice there is no peopleid 2 from first join so correct answer is to retun
>null
>
>Rick
>
>-Original Message-
>From: Michaël Delorme [mailto:[EMAIL PROTECTED]]
>Sent: Friday, December 07, 2001
: [EMAIL PROTECTED]
Subject: Query and join problem with null values
Hi guys
I have a problem on a SQL query : I got no records selected. Below
is a sample of my 2 tables :
A table identifying people, containing their adress therefore a ZIP
code. However for some people I don't have their a
1 - 100 of 119 matches
Mail list logo