Hi Dave,
Unfortunately species_id is a column I am using for joining so I need the
fully qualified name both in the SELECT and the ORDER BY.
What does the join have to do with the ORDER BY?
With regards,
Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL MS
Don't follow your question - you suggested I use the column name (with no
table name) as the ORDER BY. I said I can;t do this because I join on that
column name - this means any references to it MUST be qualified with a table
name.
Anyway - reported this as a 4.1.2 bug (on the grounds that it
Hi Dave,
Don't follow your question - you suggested I use the column name (with no
table name) as the ORDER BY. I said I can;t do this because I join on that
column name - this means any references to it MUST be qualified with a
table
name.
Actually, I suggested to use ORDER BY 1 ASC
With
RE: the bug was in 4.0.17, which should not
have allowed this behaviour!
That makes sense if you think about it in relation to UNION queries.
There is a major difference between a simple query and the results of a
UNION query. In a UNION, the first SELECT clause of the first simple query
Thanks - this is now on the bugs.mysql.com site as bug 4156 - which as you
say is actually a bug in the old version. Appreciate your explanation - what
seems to happen is that even though the SELECT has a fully qualified column
name (which it has to have as species_id occurs in both tables I am
I am getting the above error (the number is wrong - manual says this is
1249) on a statement of the form
(SELECT species_table.species_id,count(*) as c FROM species_table INNER JOIN
checklist_table USING (species_id,subspecies_id,name_id) GROUP BY
species_id,source HAVING c=1)
UNION
(SELECT
Hi Dave,
I am getting the above error (the number is wrong - manual says this is
1249) on a statement of the form
(SELECT species_table.species_id,count(*) as c FROM species_table INNER
JOIN
checklist_table USING (species_id,subspecies_id,name_id) GROUP BY
species_id,source HAVING c=1)
Unfortunately species_id is a column I am using for joining so I need the
fully qualified name both in the SELECT and the ORDER BY.
Anyway - I have just installed 40.17 on an old PC and found this statement
works on 4.0.17, so it is clearly a feature of 4.1.2 and I will report
it
Thanks