Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using select statement
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00472583
Message ID:
00472588
Vues:
33
There is probably a better way but I would use recno() like this;
sele AMT_table
go bottom
lnRecno = Recno()

Select Totamt ;
	From AMT_table ;
	into array test ;
	where recno()=lnRecno
>I am trying to bring records into my array using select statements. Instead of bringing in a number of records that match the criteria, is a there a command to bring in only one record into array (perferable last record). For example:
>
>my table has following fields
>year, fica1, totamt
>
>follow data exist in table AMT_table
>
>Year, Fica1, Totamt
>99, 1, 21
>00, 1, 22
>00, 1, 22
>00, 0, 10
>00, 0, 10
>00, 1, 23
>00, 1, 23
>
>
>when I issue follow command Select Totamt From AMT_table into array test Where Year = 00 and Fica1 = 1
>
>The following result comeout
>
>test(1,1) = 22
>test(2,1) = 22
>test(3,1) = 23
>test(4,1) = 23
>
>is the a way I can use select statement to give just the last record instead of filling the array with 4 elements. In my program, The data I try to extract is on a much larger scale (300 records may show up in array) and I only need the last record (or figures).
>
>
>thanks
>Nick Patel
Rip Ryness
International Falls, MN
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform