Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Select max(fkey) from table into array lavalue
Message
 
 
To
31/01/2006 03:24:50
Ken Knorr
Logos Management Software
Ventura, California, United States
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01091785
Message ID:
01091831
Views:
12
It's a change in VFP9 which makes result of the query with aggregate funcions ANSI Standard compliant. See SET ENGINEBEHAVIOR in the help for details.

>In vfp 8 i would get the max integer key value in a table with:
>
>local lavalue[1]
>lavalue = .f.
>select max(fkey) from table into array lavalue
>
>lavalue[1] would return .f.
>
>in Vfp 9 sp1 this returns .NULL.
>
>I can change the select statement to
>select max(fkey) from table group by fkey into array lavalue
>
>and lavalue[1] will return .f.
>
>
>Code to test this
>
>create cursor ken (fkey I)
>local lavalue[1]
>
>lavalue = .f.
>select max(fkey) from ken into array lavalue
>? lavalue[1]
>
>I don't remember having this problem in Vfp 9
>has any one else had this problem?
>
>Ken
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform