Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB General » View Thread |
Messages 21 to 29 of 29 total |
RecNo equivalent |
Wed, Jul 30 2008 5:21 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Roy,
<< I see where you're coming from now. But in that scenario, unless he's moved off the last record, it would be easier just to go .Next and keep on. >> It's not even worth the time considering such an option. You'll save a few ticks, period, and introduce a bunch of code for no reason. Just use bookmarks and it works in all cases, and is fast. -- Tim Young Elevate Software www.elevatesoft.com |
Wed, Jul 30 2008 5:23 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Roy,
<< Just trying it again, select runsum(1),_Name from companies ElevateDB Error #700 An error was found in the statement at line 1 and column 18 (Invalid expression "_Name" found, the necessary GROUP BY clause is missing) Reading the manual I can't reconcile what I'm reading with the effect I'm getting. I think <<The selected rows can be grouped into logical sub-sets by using the GROUP BY...>> should read "The selected rows MUST be grouped into logical sub-sets by using the GROUP BY..." together with something about if you only have a runsum column it'll consider the whole select clause as its group and you end up with one number. >> Where in the manual are you getting this text that you're referring to ? This behavior is standard GROUP BY behavior. -- Tim Young Elevate Software www.elevatesoft.com |
Thu, Jul 31 2008 3:59 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Tim
>Where in the manual are you getting this text that you're referring to ? The section on RUNSUM in the sql manual attached to EDBManager >This behavior is standard GROUP BY behavior. I'm not saying it isn't, just that the word "can" should be replaced by "must". To me "can" indicates its optional, and unless you take the special case of no other columns it is mandatory. Roy Lambert |
Thu, Jul 31 2008 5:30 AM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Roy,
<< I'm not saying it isn't, just that the word "can" should be replaced by "must". To me "can" indicates its optional, and unless you take the special case of no other columns it is mandatory. >> It *is* optional. If you don't specify a GROUP BY, then you get a single-column, single-row result set with the RUNSUM() result for the entire set. This is standard aggregate behavior. -- Tim Young Elevate Software www.elevatesoft.com |
Thu, Jul 31 2008 6:08 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Tim
>It *is* optional. If you don't specify a GROUP BY, then you get a >single-column, single-row result set with the RUNSUM() result for the entire >set. We have different definitions of the word optional >This is standard aggregate behavior. And glancing at a couple of the other functions I see they used the same template for their definition Roy Lambert |
Thu, Jul 31 2008 6:24 AM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Roy,
<< We have different definitions of the word optional >> You're assuming that someone wouldn't want a single-row, single-value result from a query like this: SELECT RUNSUM(MyColumn) FROM MyTable Why are you assuming that this is not a valid query ? << And glancing at a couple of the other functions I see they used the same template for their definition >> Yes, their behaviors are all exactly the same. -- Tim Young Elevate Software www.elevatesoft.com |
Thu, Jul 31 2008 7:25 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Tim
>You're assuming that someone wouldn't want a single-row, single-value result >from a query like this: > >SELECT RUNSUM(MyColumn) FROM MyTable > >Why are you assuming that this is not a valid query ? I'm not which is why I had "together with something about......" in the post I'm trying to remember an old saying that's perfect for this. I think it was to do with China under the first dynasty but I'm probably wrong. It was either "whatever is not banned is mandatory" or "whatever is not mandatory is banned". I would consider it optional there if SELECT RUNSUM(MyColumn) FROM MyTable GROUP BY MyColumn made sense I know its doable but I can't think of any of my tables where it would make sense. OTOH I'm sure there's someone out there with an example. Roy Lambert |
Thu, Jul 31 2008 8:17 AM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Roy,
<< I would consider it optional there if SELECT RUNSUM(MyColumn) FROM MyTable GROUP BY MyColumn made sense I know its doable but I can't think of any of my tables where it would make sense. OTOH I'm sure there's someone out there with an example. >> EDB, unlike DBISAM, allows you to reference expressions in the ORDER BY and GROUP BY clauses that don't exist in the SELECT columns list. Therefore, the above will give you a RUNSUM() of MyColumn, grouped by MyColumn. That query in particular is nonsensical due to the column being referenced in the GROUP BY, but this isn't: SELECT RUNSUM(ItemsTotal) FROM orders GROUP BY custno -- Tim Young Elevate Software www.elevatesoft.com |
Thu, Jul 31 2008 8:50 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Tim
>EDB, unlike DBISAM, allows you to reference expressions in the ORDER BY and >GROUP BY clauses that don't exist in the SELECT columns list. Now that was DBISAM thinking OK I'll accept optional. Roy Lambert |
« Previous Page | Page 3 of 3 | |
Jump to Page: 1 2 3 |
This web page was last updated on Tuesday, April 30, 2024 at 03:55 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |