Bugs item #2787448, was opened at 2009-05-05 20:52 Message generated for change (Comment added) made by stmane You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=482468&aid=2787448&group_id=56967
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: SQL/Core Group: MonetDB5 CVS Head Status: Open Resolution: None Priority: 5 Private: No Submitted By: Stefan de Konink (skinkie) Assigned to: Niels Nes (nielsnes) Summary: Better error message for count(*) vs order by Initial Comment: sql>select count(*) from way_tags, mytemp, mytemp2 where k= 'highway' and v = 'unclassified' and way_tags.way = mytemp2.way and mytemp2.segment = mytemp.row order by mytemp2.way, mytemp2.segment; !SELECT: no such column 'mytemp2.way' It took me some while to figure out that count(*) didn't like order by. ---------------------------------------------------------------------- >Comment By: Stefan Manegold (stmane) Date: 2009-05-05 23:23 Message: AFAIR, the SQL standard required order by columns and/or expression to occur in the projection list (select clause) of the query. Basically, consider order by working on a subset of the projection list (select clause) of the query. A possible reason herefore is (IMHO) that otherwise (i.e., with not all order by columns present in the result, implicit duplicate elimination might drop tuples that have been used for sorting. Then the error message is IMHO quite clear in your case: by the time order by get's its turn, all columns are already projected away. (Let alone that using order by in a query that is supposed to return a single single-attribute tuple, i.e., a single value, does not seems to make much sense, anyway ... ;-)) ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=482468&aid=2787448&group_id=56967 ------------------------------------------------------------------------------ The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your production scanning environment may not be a perfect world - but thanks to Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700 Series Scanner you'll get full speed at 300 dpi even with all image processing features enabled. http://p.sf.net/sfu/kodak-com _______________________________________________ Monetdb-bugs mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/monetdb-bugs
