Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
GROUP BY 1 no longer works
Message
De
18/02/2003 21:13:15
 
 
À
18/02/2003 20:34:30
Mike Yearwood
Toronto, Ontario, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00750415
Message ID:
00754780
Vues:
22
Mike,

Well I'd consider that query to be invalid, but understand that VFP allows it at this time.

I acknowledge that there were bugs and that they were fixed. I hae trouble with both attributing the NEED to go ANSI as the only way to fix it and the implementation forcing SET ENGINEBEHAVIOR to have old (now broken) queries work.

cheers


>Hi Jim
>
>You certainly have the right to opine ;) You do understand that if you do this...
>
>select max(field1),field2 from table group by field3
>
>field1 field2 field3
> 3 A 1
> 2 B 1
> 1 C 1
>
>That the results of the query will be wrong?
>
> 3 C
>
>I'll bet most people would expect that field2 in the result would be A.
>
>>Hi Mike,
>>
>>I expressed that I felt that a different implementation would have been better IN MY OPINION.
>>Sergey, it seems, takes issue with my opinion. So when challenged, I reply. I still feel strongly that fixing the bugs and addressing ANSI compatibility were two separate issues.
>>
>>I long ago in the thread acknowledged that we get what we get and though what we got is not what I'd like, that's tough (for me).
>>But maybe this discussion will give the VFP Team pause on the next such revision decision.
>>
>>
>>>Jim
>>>
>>>Why argue about this? Was it better to be stuck with a design that could give incorrect results since Foxpro 2.x? Just because something worked the way it worked for a really long time doesn't make it right.
>>>
>>>They did give a way to maintain compatability with a backward design.
>>>
>>>>Sergey,
>>>>
>>>>>Jim,
>>>>>
>>>>>You still missing the point. They fixed bugs in SQL Engine, nothing more. The ANSI compability was a result or the way of bug fixes not an addition to the bug fixes. As Gene mentioned in Re: GROUP BY 1 no longer works Message #754560, the discussion was about what make a default, VFP7 or VFP8 SQL Engine behavior.
>>>>
>>>>So you are saying that the removal of memo allowability in DISTINCT select queries was a requirement to FIX the known bug?
>>>>And you are saying that the need to now include ALL SELECTed fields in GROUP BY was a requirement to FIX the known bug?
>>>>I don't think that either is the case, personally, but it is clear to me that at least the GROUP BY **can** be attributable to ANSI SQL compatability. I believe the both could have been fixed within the existing syntax - it's a simple matter of programming.
>>>>
>>>>I agree that there were bugs and that they have fixed them. I don't feel that it was necessary to adopt ANSI IN ORDER TO FIX THEM.
>>>>Now I don't object that ANSI compatibility was implemented TOO, because I think that is a good thing for the future.
>>>>BUT it remains that I do not feel that the implementation we got was the optimal one. And it remains that we get what we get and have to live with it.
>>>>SNIP
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform