Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to Store Data in a variable
Message
De
07/03/2013 05:45:02
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
06/03/2013 13:34:11
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP
Network:
Windows XP
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01567634
Message ID:
01567692
Vues:
38
>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)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform