Re: Error 1250 Table from one of the SELECT's cannot be used in global ORDER clause

2004-06-16 Thread Martijn Tonies
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

Re: Error 1250 Table from one of the SELECT's cannot be used in global ORDER clause

2004-06-16 Thread Dave Torr
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

Re: Error 1250 Table from one of the SELECT's cannot be used in global ORDER clause

2004-06-16 Thread Martijn Tonies
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: Error 1250 Table from one of the SELECT's cannot be used in global ORDER clause

2004-06-16 Thread SGreen
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

Re: Error 1250 Table from one of the SELECT's cannot be used in global ORDER clause

2004-06-16 Thread Dave Torr
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

Error 1250 Table from one of the SELECT's cannot be used in global ORDER clause

2004-06-15 Thread Dave Torr
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

Re: Error 1250 Table from one of the SELECT's cannot be used in global ORDER clause

2004-06-15 Thread Martijn Tonies
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)

Re: Error 1250 Table from one of the SELECT's cannot be used in global ORDER clause

2004-06-15 Thread Dave Torr
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