Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to Store Data in a variable
Message
From
07/03/2013 05:45:02
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
06/03/2013 13:34:11
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP
Network:
Windows XP
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01567634
Message ID:
01567692
Views:
37
>I using the following command to get minimum and Maximum Value
>
>SELECT MIN(pos) FROM Dummy where Pageno=3
>SELECT MAX(pos) FROM Dummy where Pageno=3
>
>When I use the above command It gives me Minimum & Maximum of the page but the result is shown as Query, I don't need the result to be shwn on screen as Query, I need the result to be stored in a Variable say MinResult and Maxresuklt, so that I can use it further in My code.
>
>How to do This ?
>
>Harsh

You can also select into a cursor. Adapting Naomi's solution:
select Min(pos) as MinPos, max(Pos) as MaxPos from Dummy where PageNo = 3 into cursor TmpSolution
* Min: TmpSolution.MinPos
* Max: TmpSolution.MaxPos
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Reply
Map
View

Click here to load this message in the networking platform