Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to dynamically Resize array.
Message
 
 
À
17/04/2003 08:29:45
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00778384
Message ID:
00778790
Vues:
35
>sb,
>
>Do you have code examples of this? I'd love to see one
>with SQL if you have that as well.
>
>fz

Here're a few query examples.
* Create an array
DIMENSION laList[1]
? ALEN(laList,1),  ALEN(laList,2)			&& 1,0

* Select multiple rows and columns into array
SELECT * ;
	FROM products ;
	WHERE product_id < "     5" ;
	INTO ARRAY laList
? _TALLY, ALEN(laList,1),  ALEN(laList,2)	&& 4,4,10

* Select multiple rows and one column into array
SELECT Prod_name ;
	FROM products ;
	WHERE prod_name = "C" ;
	INTO ARRAY laList
? _TALLY, ALEN(laList,1),  ALEN(laList,2)	&& 9,9,1

* No rows returned, array doesn't change
SELECT Prod_name ;
	FROM products ;
	WHERE 1=2 ;
	INTO ARRAY laList
? _TALLY, ALEN(laList,1),  ALEN(laList,2)	&& 0,9,1
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform