From: SourceForge.net <no...@so...> - 2004-06-30 14:24:30
|
Bugs item #982770, was opened at 2004-06-30 14:24 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=109028&aid=982770&group_id=9028 Category: DSQL Group: None Status: Open Resolution: None Priority: 5 Submitted By: siona (siona) Assigned to: Nobody/Anonymous (nobody) Summary: COUNT() must be only value of SELECT Initial Comment: 1.5 release (on RedHat). Documentation suggests that it should be possible to do: SELECT id, COUNT(*) FROM x; but this results in: Statement failed, SQLCODE = -104 Dynamic SQL Error -SQL error code = -104 -Invalid expression in the select list (not contained in either an aggregate function or the GROUP BY clause) if tried from isql (or a similar error from a client library). SELECT COUNT(*) FROM x; works fine, as does: SELECT id, (SELECT COUNT(*) FROM x) FROM x; but the latter is terribly unwieldy when you've got a big WHERE clause involved, and doesn't appear to be documented as a legal form. ("Documentation" here is the IBPhoenix language reference and SQL function and statement reference.) ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=109028&aid=982770&group_id=9028 |
From: SourceForge.net <no...@so...> - 2004-06-30 15:00:30
|
Bugs item #982770, was opened at 2004-06-30 10:24 Message generated for change (Comment added) made by seanleyne You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=109028&aid=982770&group_id=9028 Category: DSQL Group: None >Status: Deleted >Resolution: Invalid Priority: 5 Submitted By: siona (siona) Assigned to: Nobody/Anonymous (nobody) Summary: COUNT() must be only value of SELECT Initial Comment: 1.5 release (on RedHat). Documentation suggests that it should be possible to do: SELECT id, COUNT(*) FROM x; but this results in: Statement failed, SQLCODE = -104 Dynamic SQL Error -SQL error code = -104 -Invalid expression in the select list (not contained in either an aggregate function or the GROUP BY clause) if tried from isql (or a similar error from a client library). SELECT COUNT(*) FROM x; works fine, as does: SELECT id, (SELECT COUNT(*) FROM x) FROM x; but the latter is terribly unwieldy when you've got a big WHERE clause involved, and doesn't appear to be documented as a legal form. ("Documentation" here is the IBPhoenix language reference and SQL function and statement reference.) ---------------------------------------------------------------------- >Comment By: Sean Leyne (seanleyne) Date: 2004-06-30 11:00 Message: Logged In: YES user_id=71163 Your statement is invalid! This is a support/SQL question, not a bug in the engine. Please direct this issue to the support mailing list. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=109028&aid=982770&group_id=9028 |
From: SourceForge.net <no...@so...> - 2004-06-30 15:35:42
|
Bugs item #982770, was opened at 2004-06-30 14:24 Message generated for change (Comment added) made by siona You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=109028&aid=982770&group_id=9028 Category: DSQL Group: None Status: Deleted Resolution: Invalid Priority: 5 Submitted By: siona (siona) Assigned to: Nobody/Anonymous (nobody) Summary: COUNT() must be only value of SELECT Initial Comment: 1.5 release (on RedHat). Documentation suggests that it should be possible to do: SELECT id, COUNT(*) FROM x; but this results in: Statement failed, SQLCODE = -104 Dynamic SQL Error -SQL error code = -104 -Invalid expression in the select list (not contained in either an aggregate function or the GROUP BY clause) if tried from isql (or a similar error from a client library). SELECT COUNT(*) FROM x; works fine, as does: SELECT id, (SELECT COUNT(*) FROM x) FROM x; but the latter is terribly unwieldy when you've got a big WHERE clause involved, and doesn't appear to be documented as a legal form. ("Documentation" here is the IBPhoenix language reference and SQL function and statement reference.) ---------------------------------------------------------------------- >Comment By: siona (siona) Date: 2004-06-30 15:35 Message: Logged In: YES user_id=1045403 OK, my bad for assuming that behaviour was supposed to follow the documentation. ---------------------------------------------------------------------- Comment By: Sean Leyne (seanleyne) Date: 2004-06-30 15:00 Message: Logged In: YES user_id=71163 Your statement is invalid! This is a support/SQL question, not a bug in the engine. Please direct this issue to the support mailing list. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=109028&aid=982770&group_id=9028 |
From: SourceForge.net <no...@so...> - 2004-06-30 15:43:11
|
Bugs item #982770, was opened at 2004-06-30 10:24 Message generated for change (Comment added) made by seanleyne You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=109028&aid=982770&group_id=9028 Category: DSQL Group: None Status: Deleted Resolution: Invalid Priority: 5 Submitted By: siona (siona) Assigned to: Nobody/Anonymous (nobody) Summary: COUNT() must be only value of SELECT Initial Comment: 1.5 release (on RedHat). Documentation suggests that it should be possible to do: SELECT id, COUNT(*) FROM x; but this results in: Statement failed, SQLCODE = -104 Dynamic SQL Error -SQL error code = -104 -Invalid expression in the select list (not contained in either an aggregate function or the GROUP BY clause) if tried from isql (or a similar error from a client library). SELECT COUNT(*) FROM x; works fine, as does: SELECT id, (SELECT COUNT(*) FROM x) FROM x; but the latter is terribly unwieldy when you've got a big WHERE clause involved, and doesn't appear to be documented as a legal form. ("Documentation" here is the IBPhoenix language reference and SQL function and statement reference.) ---------------------------------------------------------------------- >Comment By: Sean Leyne (seanleyne) Date: 2004-06-30 11:43 Message: Logged In: YES user_id=71163 The behaviour does follow the documentation. Your example mixed singleton (ID) and group (Count(*) operations, as such it is invalid. Not every operation/function can be specified in a single statement. ---------------------------------------------------------------------- Comment By: siona (siona) Date: 2004-06-30 11:35 Message: Logged In: YES user_id=1045403 OK, my bad for assuming that behaviour was supposed to follow the documentation. ---------------------------------------------------------------------- Comment By: Sean Leyne (seanleyne) Date: 2004-06-30 11:00 Message: Logged In: YES user_id=71163 Your statement is invalid! This is a support/SQL question, not a bug in the engine. Please direct this issue to the support mailing list. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=109028&aid=982770&group_id=9028 |