Your SQL syntax seems a bit wierd. Why do you need 'group by' and
'order by' anyway? Doesn't this get you the same thing?

         Select Sum(ObjectLen( obj, "mi" )) from MyTable
                 where CodeField = "MyCode" and Str$(obj) =
"Polyline"
                 Into MySelection

- Bill Thoen


"Bower, Daniel J" wrote:
> 
> The following worked under MI 5.5 and earlier, but causes an error in MI
> 6.0:
> 
>         Select Sum(ObjectLen( obj, "mi" )) from MyTable
>                 where CodeField = "MyCode" and Str$(obj) = "Polyline"
>                 Into MySelection Group by CodeField Order by CodeField
> 
> "CodeField" is a field in MyTable. Previously, you could order and/or group
> by fields that were not in the selection.  Now these fields have to be in
> the list of selected fields, e.g.,
> 
>         Select Sum(ObjectLen( obj, "mi" )), CodeField from MyTable
>                 where CodeField = "MyCode" and Str$(obj) = "Polyline"
>                 Into MySelection Group by CodeField Order by CodeField
> 
> Guess I'll have to look at all of my MapBasic code and try to find all the
> places where I've done this....
> 
> -----------------------------------------
> Daniel J. Bower
> Commuter Services Director
> intelitran
> 
> ----------------------------------------------------------------------
> To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
> "unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]
----------------------------------------------------------------------
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]

Reply via email to