Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB SQL » View Thread |
Messages 1 to 5 of 5 total |
GROUP BY |
Sun, Jul 21 2013 4:16 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | I can do
select _forename from contacts group by _surname IE group by is not in select clause or select (Select _Surname from contacts where contacts._id = _fkContacts) as fred,* from career group by fred IE group by is in select clause but not select * from career group by (Select _Surname from contacts where contacts._id = _fkContacts) or select * from career group by (Select _Surname from contacts where contacts._id = _fkContacts) as fred IE group by not in select clause which strikes me as inconsistent. Its the same for ORDER BY. Is there a reason? Roy Lambert |
Sun, Jul 21 2013 10:53 AM | Permanent Link |
Terry Swiers | Hi Roy,
> Is there a reason? In your first two examples, Fred resolves down to a field name. In your last two examples, your group by clause resolves to a result set, which you can't use for an order by. --------------------------------------- Terry Swiers Millennium Software, Inc. http://www.1000years.com http://www.atrex.com --------------------------------------- |
Sun, Jul 21 2013 11:15 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Terry
>In your first two examples, Fred resolves down to a field name. In your >last two examples, your group by clause resolves to a result set, which you >can't use for an order by. I accept part of what you're saying However, (Select _Surname from contacts where contacts._id = _fkContacts) is a result set as much in the select clause as in the group by clause. The only difference a mere mortal like myself can spot is that in the select clause I've given it a nice easy to use reference aka a correlation name. I suppose the real difference is that in select (Select _Surname from contacts where contacts._id = _fkContacts) as fred,* from career group by fred I've specified I want to see it, but then that doesn't stack up with the first example (it used to in DBISAM). I presume its just another of those stupid things in the standard I disagree with, dislike and have no chance of changing Roy |
Sun, Jul 21 2013 2:28 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Roy,
<< which strikes me as inconsistent. Its the same for ORDER BY. Is there a reason? >> No, it's just a limitation in EDB. Tim Young Elevate Software www.elevatesoft.com |
Mon, Jul 22 2013 3:16 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Tim
><< which strikes me as inconsistent. Its the same for ORDER BY. Is there a >reason? >> > >No, it's just a limitation in EDB. Guess what I'm going to say next <vbg> Roy |
This web page was last updated on Friday, September 20, 2024 at 05:39 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |