Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Intellisense in [] delimited query expressions, pls
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
VFPX/Sedna
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01050200
Message ID:
01053391
Vues:
24
Ok, there is more.
SET SAFETY OFF
CREATE TABLE test (customer C(12) NOT NULL;
 , sales01 N(12,2) NOT NULL, sales02 N(12,2) NOT NULL )
SET SAFETY ON
ldSoldDate={^2005-02-01}
lcSales="sales"+TRANSFORM(MONTH(ldSoldDate),"@L ##")
*insert dynamic sales figures in corresponding months
INSERT INTO test (customer,&lcSales);
 VALUES ("customer1",3.1)
INSERT INTO test (customer,(lcSales));
 VALUES ("customer1",3.1)
INSERT INTO test (customer;
 ,("sales"+TRANSFORM(MONTH(ldSoldDate),"@L ##")));
 VALUES ("customer1",3.1)
*INSERT INTO test (customer;
 ,EVALUATE("sales"+TRANSFORM(MONTH(ldSoldDate),"@L ##")));
 VALUES ("customer1",3.1)

*EVAL() is not exchangeable - prints the VALUE 3.1
?EVALUATE("sales"+TRANSFORM(MONTH(ldSoldDate),"@L ##"))

*can EXEC whole expr - that´s why it´s called MACRO and is slower
macro=[SELECT * from test INTO ARRAY aA]
*¯o - UT doesn´t seem to like ampersands (in preformatted text)
¯o
?aA(1,1),aA(1,2),aA(1,3)
Regards
G
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform